@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;600;700&display=swap');

/* 내 콘텐츠 관리 화면 (좌측 사이드바 + 메인 목록 + 우측 상세 미리보기) */
:root {
  --mc-bg: #f6f8f4;
  --mc-panel: #ffffff;
  --mc-sidebar-bg: #ffffff;
  --mc-sidebar-w: 236px;
  --mc-sidebar-rail: 60px;
  --mc-line: #e3e8e1;
  --mc-text: #20352d;
  --mc-muted: #748078;
  --mc-green: #2a624b;
  --mc-green-deep: #20352d;
  --mc-green-soft: #edf3eb;
  --mc-left: 68%;
}

* { box-sizing: border-box }

html, body {
  height: 100%;
  margin: 0;
  background: var(--mc-bg);
  color: var(--mc-text);
  font-family: 'Noto Sans KR', system-ui, sans-serif;
  font-size: 14px
}

button { font: inherit; color: inherit; cursor: pointer }
[hidden] { display: none !important }

.mc-shell {
  display: flex;
  height: 100vh;
  overflow: hidden
}

body.mc-dragging, body.mc-dragging * { cursor: col-resize !important; user-select: none !important }

/* ── 좌측 접이식 사이드바 ─────────────── */
.mc-nav-backdrop { display: none }

.mc-sidebar {
  flex: 0 0 var(--mc-sidebar-w);
  width: var(--mc-sidebar-w);
  background: var(--mc-sidebar-bg);
  border-right: 1px solid var(--mc-line);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width .2s ease, flex-basis .2s ease
}

.mc-sidebar-head {
  height: 56px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 13px;
  border-bottom: 1px solid var(--mc-line)
}

.mc-nav-toggle { flex: none }
.mc-sidebar-brand { white-space: nowrap; overflow: hidden }

.mc-sidebar-scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px 10px
}

.mc-workspace-label {
  font-size: 10px;
  font-weight: 600;
  color: #939d96;
  letter-spacing: 1.4px;
  padding: 4px 12px 10px;
  white-space: nowrap;
  transition: opacity .15s ease
}

.mc-nav {
  display: flex;
  flex-direction: column;
  gap: 4px
}

.mc-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #768078;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: background .15s ease, color .15s ease
}

.mc-nav-item:hover { background: var(--mc-green-soft); color: var(--mc-green) }
.mc-nav-item.active { background: var(--mc-green-soft); color: var(--mc-green); font-weight: 700 }

.mc-nav-item:focus-visible,
.mc-account-card:focus-visible,
.mc-nav-toggle:focus-visible,
.mc-mobile-nav-btn:focus-visible {
  outline: 2px solid var(--mc-green);
  outline-offset: 2px
}

.mc-nav-ico {
  flex: none;
  width: 22px;
  text-align: center;
  font-size: 18px;
  line-height: 1;
  color: inherit
}

.mc-nav-item:hover .mc-nav-ico,
.mc-nav-item.active .mc-nav-ico { color: var(--mc-green) }

.mc-sidebar-foot {
  flex: none;
  padding: 12px 10px;
  border-top: 1px solid var(--mc-line)
}

.mc-account-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--mc-text);
  text-decoration: none;
  transition: background .15s ease
}

.mc-account-card:hover { background: var(--mc-green-soft) }

.mc-account-avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #e9eee4;
  color: var(--mc-green);
  font-size: 14px;
  font-weight: 700
}

.mc-account-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px
}

.mc-account-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--mc-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.mc-account-sub {
  font-size: 11px;
  color: var(--mc-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

/* ── 우측 작업공간 ─────────────────────── */
.mc-workspace {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  height: 100%;
  overflow: hidden
}

.mc-head-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0
}

.mc-icon.mc-mobile-nav-btn { display: none }
.mc-brand.mc-chat-brand { display: none }

.mc-main {
  flex: 0 0 var(--mc-left);
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: radial-gradient(ellipse 65% 40% at 50% 0%, #e9eee3 0%, #f1f5ed 38%, var(--mc-bg) 80%);
  container-type: inline-size;
  container-name: mainpane
}

.mc-shell.preview-hidden .mc-main { flex: 1 1 auto }

.mc-main-head {
  height: 56px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 20px;
  background: #ffffffa6;
  border-bottom: 1px solid var(--mc-line)
}

.mc-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--mc-text);
  text-decoration: none;
  font-size: 15px
}

.mc-brand b {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--mc-green);
  color: #fff;
  font-size: 14px
}

.mc-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--mc-muted);
  font-size: 18px
}

.mc-icon:hover { background: var(--mc-green-soft); color: var(--mc-green) }

.mc-crumb {
  font-size: 14px;
  font-weight: 700;
  color: var(--mc-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.mc-head-actions { display: flex; gap: 8px; align-items: center; flex: none }

.mc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid var(--mc-line);
  border-radius: 18px;
  background: #fff;
  color: var(--mc-text);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s ease, border-color .15s ease, color .15s ease
}

.mc-btn:hover { background: var(--mc-green-soft); border-color: #cfd9cc; color: var(--mc-green) }
.mc-btn.primary { background: var(--mc-green); border-color: var(--mc-green); color: #fff }
.mc-btn.primary:hover { background: var(--mc-green-deep); border-color: var(--mc-green-deep); color: #fff }

.mc-ghost {
  border: 1px solid var(--mc-line);
  background: #fff;
  border-radius: 18px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--mc-text);
  white-space: nowrap;
  transition: background .15s ease, border-color .15s ease, color .15s ease
}

.mc-ghost:hover { background: var(--mc-green-soft); border-color: #cfd9cc; color: var(--mc-green) }

.mc-only-collapsed { display: none }
.mc-shell.preview-hidden .mc-only-collapsed { display: inline-flex }
.mc-shell.preview-hidden .mc-only-collapsed[hidden] { display: none }

/* ── 본문 (통계, 검색/필터, 카드 그리드) ── */
.mc-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 26px 28px 40px
}

.mc-intro,
.mc-stats,
.mc-toolbar,
.mc-result-bar,
.mc-grid {
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto
}

.mc-intro { margin-bottom: 20px }

.mc-intro h1 {
  margin: 0 0 6px;
  font-size: 26px;
  font-weight: 700;
  color: var(--mc-text);
  letter-spacing: -.3px
}

.mc-intro p {
  margin: 0;
  color: var(--mc-muted);
  font-size: 13px;
  line-height: 1.5
}

.mc-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px
}

.mc-stat {
  background: var(--mc-panel);
  border: 1px solid var(--mc-line);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  gap: 6px
}

.mc-stat span {
  font-size: 12px;
  font-weight: 600;
  color: var(--mc-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.mc-stat b {
  font-size: 22px;
  font-weight: 700;
  color: var(--mc-text);
  line-height: 1.2
}

.mc-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px
}

.mc-search {
  flex: 1 1 240px;
  min-width: 0;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--mc-line);
  border-radius: 19px;
  background: #fff;
  color: var(--mc-text);
  font: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease
}

.mc-search::placeholder { color: #939d96 }
.mc-search:focus { border-color: var(--mc-green); box-shadow: 0 0 0 3px #2a624b14 }

.mc-filters {
  display: flex;
  flex-wrap: nowrap;
  min-width: 0;
  align-items: center;
  gap: 6px
}

.mc-filter {
  flex: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 13px;
  border: 1px solid var(--mc-line);
  border-radius: 18px;
  background: #fff;
  color: var(--mc-muted);
  font-size: 12px;
  font-weight: 600;
  transition: background .15s ease, border-color .15s ease, color .15s ease
}

.mc-filter:hover { background: var(--mc-green-soft); border-color: #cfd9cc; color: var(--mc-green) }
.mc-filter.active { background: var(--mc-green); border-color: var(--mc-green); color: #fff }

.mc-filter .mc-filter-count {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #edf0ea;
  color: var(--mc-text);
  font-size: 11px;
  font-weight: 700
}

.mc-filter.active .mc-filter-count { background: #ffffff2e; color: #fff }

.mc-sort {
  flex: none;
  margin-left: auto;
  white-space: nowrap;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--mc-line);
  border-radius: 18px;
  background: #fff;
  color: var(--mc-text);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  outline: none
}

.mc-sort:focus { border-color: var(--mc-green) }

.mc-result-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px
}

.mc-result-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--mc-muted)
}

/* ── 콘텐츠 카드 그리드 ───────────────── */
.mc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 16px
}

.mc-card {
  display: flex;
  flex-direction: column;
  background: var(--mc-panel);
  border: 1px solid var(--mc-line);
  border-radius: 14px;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease
}

.mc-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px #20352d12;
  border-color: #cfd9cc
}

.mc-card.is-selected {
  border-color: var(--mc-green);
  box-shadow: 0 0 0 3px #2a624b1c
}

.mc-card-cover {
  position: relative;
  height: 152px;
  padding: 12px;
  background: linear-gradient(135deg, #2a624b 0%, #20352d 100%);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start
}

.mc-card-cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease
}

.mc-card:hover .mc-card-cover-img { transform: scale(1.03) }

.mc-card-cover-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px
}

.mc-card-devices {
  display: flex;
  flex-wrap: wrap;
  gap: 4px
}

.mc-device-pill {
  padding: 3px 8px;
  border-radius: 999px;
  background: #20352d99;
  color: #fff;
  font-size: 10px;
  font-weight: 600
}

.mc-fav-btn {
  flex: none;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: #ffffffd9;
  color: var(--mc-muted);
  display: grid;
  place-items: center;
  font-size: 14px;
  transition: background .15s ease, color .15s ease, transform .15s ease
}

.mc-fav-btn:hover { background: #fff; color: #d4941a; transform: scale(1.06) }
.mc-fav-btn.is-on { background: #fff; color: #d4941a }

.mc-card-body {
  flex: 1 1 auto;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px
}

.mc-card-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: var(--mc-muted)
}

.mc-status-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--mc-green-soft);
  color: var(--mc-green);
  font-size: 11px;
  font-weight: 600
}

.mc-status-tag.is-trash { background: #fdf1f0; color: #a83b32 }
.mc-status-tag.is-deployed { background: var(--mc-green); color: #fff }
.mc-status-tag.is-deployed::before { content: '●'; font-size: 8px; margin-right: 5px }

.mc-dt-play-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--mc-green);
  text-decoration: none
}
.mc-dt-play-link:hover { text-decoration: underline }

.mc-card-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--mc-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.35
}

.mc-card-meta {
  font-size: 12px;
  color: var(--mc-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.mc-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 2px
}

.mc-meta-chip {
  padding: 2px 8px;
  border-radius: 8px;
  background: var(--mc-bg);
  border: 1px solid var(--mc-line);
  color: var(--mc-muted);
  font-size: 11px;
  font-weight: 500;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.mc-card-actions {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid #edf0ea;
  display: flex;
  align-items: center;
  gap: 6px
}

.mc-card-edit {
  margin-right: auto;
  font-size: 12px;
  font-weight: 700;
  color: var(--mc-green);
  text-decoration: none;
  background: transparent;
  border: 0;
  padding: 4px 2px;
  white-space: nowrap
}

.mc-card-edit:hover { color: var(--mc-green-deep); text-decoration: underline }

.mc-card-btn {
  padding: 5px 10px;
  border: 1px solid var(--mc-line);
  border-radius: 8px;
  background: #fafbf9;
  color: var(--mc-text);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  transition: background .15s ease, border-color .15s ease, color .15s ease
}

.mc-card-btn:hover { background: var(--mc-green-soft); border-color: #cfd9cc; color: var(--mc-green) }
.mc-card-btn.danger { color: #a83b32 }
.mc-card-btn.danger:hover { background: #fdf1f0; border-color: #e6c8c4; color: #8c2820 }

.mc-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 56px 24px;
  border: 1px dashed var(--mc-line);
  border-radius: 16px;
  background: #ffffffb3;
  text-align: center;
  color: var(--mc-muted)
}

.mc-empty-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--mc-green-soft);
  color: var(--mc-green);
  display: grid;
  place-items: center;
  font-size: 22px
}

.mc-empty strong { font-size: 15px; color: var(--mc-text) }
.mc-empty p { margin: 0; font-size: 13px; color: var(--mc-muted); line-height: 1.5 }

/* ── 크기 조절 바 ─────────────────────── */
.mc-splitter {
  flex: 0 0 8px;
  position: relative;
  cursor: col-resize;
  background: var(--mc-bg);
  outline: none;
  touch-action: none
}

.mc-splitter span {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 3px;
  width: 2px;
  background: var(--mc-line);
  transition: background .15s
}

.mc-splitter::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 1px;
  width: 6px;
  height: 40px;
  margin-top: -20px;
  border-radius: 3px;
  background: #c7d1c5;
  transition: background .15s
}

.mc-splitter:hover span,
.mc-splitter:focus-visible span,
body.mc-dragging .mc-splitter span { background: var(--mc-green) }

.mc-splitter:hover::after,
.mc-splitter:focus-visible::after,
body.mc-dragging .mc-splitter::after { background: var(--mc-green) }

/* ── 우측 상세 미리보기 패널 ───────────── */
.mc-shell.preview-hidden .mc-splitter,
.mc-shell.preview-hidden .mc-detail { display: none }

.mc-detail {
  flex: 1 1 0;
  min-width: 0;
  background: var(--mc-panel);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  container-type: inline-size;
  container-name: detailpane
}

.mc-detail-head {
  height: 56px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  border-bottom: 1px solid var(--mc-line);
  color: var(--mc-text);
  font-size: 14px
}

.mc-detail-head-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0
}

.mc-dt-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--mc-green-soft);
  color: var(--mc-green);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap
}

.mc-dt-badge:empty { display: none }

.mc-detail-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 18px
}

.mc-dt-wrap { display: flex; flex-direction: column; gap: 16px }

.mc-dt-cover {
  position: relative;
  min-height: 148px;
  border: 1px solid var(--mc-line);
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, #2a624b 0%, #20352d 100%);
  display: flex;
  align-items: flex-end
}

.mc-dt-cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover
}

.mc-dt-cover-overlay {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 14px;
  background: linear-gradient(180deg, #20352d1a 0%, #20352dd4 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 4px
}

.mc-dt-title { font-size: 16px; font-weight: 700; line-height: 1.35; color: #fff }
.mc-dt-place { font-size: 12px; color: #e9eee4 }

.mc-dt-section { display: flex; flex-direction: column; gap: 8px }
.mc-dt-section-head { font-size: 12px; font-weight: 600; color: var(--mc-muted) }

.mc-dt-grid {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--mc-line);
  border-radius: 12px;
  background: var(--mc-bg);
  overflow: hidden
}

.mc-dt-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--mc-line);
  font-size: 12px;
  line-height: 1.45
}

.mc-dt-row:last-child { border-bottom: 0 }
.mc-dt-row span, .mc-dt-row strong { color: var(--mc-muted); font-weight: 600; flex: none }
.mc-dt-row b, .mc-dt-row em { color: var(--mc-text); font-weight: 500; font-style: normal; text-align: right; word-break: break-word }

.mc-dt-synopsis {
  padding: 12px;
  border: 1px solid var(--mc-line);
  border-radius: 12px;
  background: var(--mc-bg);
  font-size: 13px;
  color: var(--mc-text);
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word
}

.mc-dt-missions { display: flex; flex-direction: column; gap: 6px }

.mc-dt-mission-item {
  display: grid;
  grid-template-columns: 186px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--mc-line);
  border-radius: 10px;
  background: var(--mc-bg);
  font-size: 12px;
  color: var(--mc-text);
  line-height: 1.5
}

.mc-dt-mission-item strong {
  color: var(--mc-text);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.mc-dt-mission-item span {
  color: var(--mc-text);
  word-break: keep-all;
  overflow-wrap: anywhere
}

.mc-dt-mission-item:not(:has(strong)) {
  display: block;
  color: var(--mc-muted)
}

.mc-dt-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 4px }

.mc-dt-btn {
  flex: 1 1 120px;
  padding: 9px 12px;
  border: 1px solid var(--mc-line);
  border-radius: 10px;
  background: var(--mc-panel);
  color: var(--mc-text);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease, color .15s ease
}

.mc-dt-btn:hover { background: var(--mc-green-soft); border-color: #cfd9cc; color: var(--mc-green) }
.mc-dt-btn.primary { background: var(--mc-green); border-color: var(--mc-green); color: #fff }
.mc-dt-btn.primary:hover { background: var(--mc-green-deep); border-color: var(--mc-green-deep); color: #fff }
.mc-dt-btn.danger { color: #a83b32 }
.mc-dt-btn.danger:hover { background: #fdf1f0; border-color: #e6c8c4; color: #8c2820 }

/* ── 관리 모달 & 토스트 ───────────────── */
.mc-dialog {
  border: 1px solid var(--mc-line);
  border-radius: 16px;
  width: min(420px, calc(100vw - 32px));
  padding: 0;
  background: #fff;
  color: var(--mc-text);
  box-shadow: 0 20px 50px #20352d30
}

.mc-dialog::backdrop { background: #20352d4d }

.mc-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--mc-line);
  font-size: 15px
}

.mc-dialog-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px
}

.mc-dialog-list {
  display: flex;
  flex-direction: column;
  gap: 8px
}

.mc-dialog-text {
  margin: 0;
  font-size: 13px;
  color: var(--mc-text);
  line-height: 1.55
}

.mc-dialog-input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--mc-line);
  border-radius: 10px;
  background: #fafbf9;
  color: var(--mc-text);
  font: inherit;
  font-size: 13px;
  outline: none
}

.mc-dialog-input:focus { border-color: var(--mc-green); background: #fff }

.mc-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap
}

.mc-dialog-btn {
  padding: 8px 14px;
  border: 1px solid var(--mc-line);
  border-radius: 10px;
  background: #fff;
  color: var(--mc-text);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  transition: background .15s ease, border-color .15s ease, color .15s ease
}

.mc-dialog-btn:hover { background: var(--mc-green-soft); border-color: #cfd9cc; color: var(--mc-green) }
.mc-dialog-btn.primary { background: var(--mc-green); border-color: var(--mc-green); color: #fff; text-align: center }
.mc-dialog-btn.primary:hover { background: var(--mc-green-deep); border-color: var(--mc-green-deep); color: #fff }
.mc-dialog-btn.danger { color: #a83b32; border-color: #e6c8c4 }
.mc-dialog-btn.danger:hover { background: #fdf1f0; border-color: #d99d96; color: #8c2820 }

.mc-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  padding: 10px 18px;
  border-radius: 20px;
  background: var(--mc-text);
  color: #fff;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: .2s;
  z-index: 60
}

.mc-toast.show { opacity: 1; transform: translate(-50%, 0) }

/* ── 반응형 ───────────────────────────── */
@media (max-width: 900px) {
  .mc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)) }
}

@container detailpane (max-width: 460px) {
  .mc-dt-mission-item { grid-template-columns: 1fr; gap: 4px }
  .mc-dt-mission-item strong { white-space: normal }
}

@container mainpane (max-width: 680px) {
  .mc-toolbar { gap: 8px }
  .mc-search { flex: 1 1 100% }
  .mc-filters { flex: 1 1 auto; gap: 5px }
  .mc-filter { height: 34px; padding: 0 10px; gap: 5px }
  .mc-sort { height: 34px; padding: 0 10px }
}

@container mainpane (max-width: 560px) {
  .mc-body { padding: 20px 18px 32px }
  .mc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px }
  .mc-stat { padding: 12px 14px }
}

@container mainpane (max-width: 440px) {
  .mc-toolbar { gap: 6px }
  .mc-filters { gap: 4px }
  .mc-filter { height: 32px; padding: 0 8px; gap: 4px; font-size: 11px }
  .mc-filter .mc-filter-count { min-width: 16px; height: 16px; padding: 0 4px; font-size: 10px }
  .mc-sort { height: 32px; padding: 0 8px; font-size: 11px }
}

@container mainpane (max-width: 340px) {
  .mc-filters { flex-wrap: wrap }
}

/* 데스크톱 접힘 상태 (모바일 드로어와 분리) */
@media (min-width: 768px) {
  .mc-shell.nav-collapsed .mc-sidebar {
    flex-basis: var(--mc-sidebar-rail);
    width: var(--mc-sidebar-rail)
  }
  .mc-shell.nav-collapsed .mc-sidebar-head { justify-content: center; padding: 0 }
  .mc-shell.nav-collapsed .mc-brand.mc-sidebar-brand { display: none }
  .mc-shell.nav-collapsed .mc-brand.mc-chat-brand { display: flex }
  .mc-shell.nav-collapsed .mc-sidebar-scroll { padding: 10px 0 }
  .mc-shell.nav-collapsed .mc-workspace-label {
    height: 0;
    padding: 0;
    opacity: 0;
    overflow: hidden
  }
  .mc-shell.nav-collapsed .mc-nav { align-items: center; gap: 6px }
  .mc-shell.nav-collapsed .mc-nav-item {
    width: 40px;
    height: 40px;
    padding: 0;
    justify-content: center
  }
  .mc-shell.nav-collapsed .mc-nav-txt { display: none }
  .mc-shell.nav-collapsed .mc-sidebar-foot {
    padding: 12px 0;
    display: flex;
    justify-content: center
  }
  .mc-shell.nav-collapsed .mc-account-card { padding: 4px; justify-content: center }
  .mc-shell.nav-collapsed .mc-account-meta { display: none }
}

/* 좁은 화면(모바일) */
@media (max-width: 767px) {
  .mc-shell { flex-direction: column; height: auto; min-height: 100vh; overflow: visible }
  .mc-workspace { flex-direction: column; height: auto; min-height: 100vh; overflow: visible }
  .mc-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 248px;
    max-width: 82vw;
    height: 100vh;
    z-index: 40;
    transform: translateX(-100%);
    transition: transform .22s ease;
    box-shadow: 12px 0 32px #20352d24
  }
  .mc-shell.nav-mobile-open .mc-sidebar { transform: translateX(0) }
  .mc-nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 35;
    background: #20352d4d;
    opacity: 0;
    transition: opacity .2s ease
  }
  .mc-shell.nav-mobile-open .mc-nav-backdrop { display: block; opacity: 1 }
  .mc-icon.mc-mobile-nav-btn { display: grid }
  .mc-brand.mc-chat-brand { display: flex }
  .mc-crumb { display: none }
  .mc-main-head { height: auto; min-height: 56px; padding: 8px 14px; flex-wrap: wrap; gap: 8px }
  .mc-head-actions { gap: 6px; margin-left: auto }
  .mc-body { padding: 18px 16px 32px }
  .mc-main { flex: none; min-height: 100vh }
  .mc-splitter { display: none }
  .mc-detail {
    flex: none;
    position: static;
    width: 100%;
    min-height: 60vh;
    border-left: 0;
    border-top: 1px solid var(--mc-line);
    box-shadow: none
  }
}

@media (prefers-reduced-motion: reduce) {
  .mc-sidebar,
  .mc-nav-backdrop,
  .mc-workspace-label,
  .mc-card,
  .mc-card-cover-img,
  .mc-fav-btn { transition: none }
}
