/* 메인 — dietblog.kr 카페형 레이아웃 */
:root {
  --theme-primary: #03c75a;
  --theme-bg: #f5f6f8;
  --theme-text: #222;
  --theme-muted: #9ca3af;
  --theme-border: #e5e8eb;
  --font: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --font-title: "NanumSquareNeo", "NanumSquare Neo", "Pretendard", sans-serif;
  --font-body: "Nanum Gothic", "NanumGothic", "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.9;
  background: var(--theme-bg);
  color: #222;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  font-family: var(--font);
  cursor: pointer;
}

/* Banner */
.mc-banner {
  width: 100%;
  max-height: 300px;
  overflow: hidden;
  position: relative;
}

.mc-banner-fallback {
  background: linear-gradient(135deg, var(--theme-primary), #00a843);
  padding: 60px 20px;
  text-align: center;
}

.mc-banner-fallback h1 {
  color: #fff;
  font-family: var(--font-title);
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.mc-banner-fallback p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
  margin-top: 8px;
}

/* Tab Bar */
.mc-tabbar {
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
}

.mc-tabbar-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.mc-tab {
  padding: 12px 20px;
  font-size: 14px;
  color: #666;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}

.mc-tab.active {
  color: var(--theme-primary);
  font-weight: 700;
  border-bottom-color: var(--theme-primary);
}

/* Main Layout */
.mc-main {
  max-width: 1080px;
  margin: 20px auto;
  padding: 0 20px 40px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
}

/* Section Cards */
.mc-section {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  margin-bottom: 16px;
  overflow: hidden;
}

.mc-section-header {
  padding: 16px 20px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f0f0f0;
}

.mc-section-title {
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 800;
  color: #222;
}

.mc-section-more {
  font-size: 13px;
  color: #999;
}

/* Notice */
.mc-notice-list {
  list-style: none;
}

.mc-notice-item {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid #f8f8f8;
  font-size: 14px;
}

.mc-notice-item:last-child {
  border-bottom: none;
}

.mc-notice-badge {
  display: inline-block;
  padding: 2px 8px;
  background: #e8f5e9;
  color: #2e7d32;
  font-size: 11px;
  font-weight: 700;
  border-radius: 3px;
  margin-right: 10px;
  flex-shrink: 0;
}

.mc-notice-title {
  flex: 1;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mc-notice-date {
  font-size: 12px;
  color: #999;
  flex-shrink: 0;
  margin-left: 12px;
}

/* Popular grid */
.mc-popular-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.mc-popular-item {
  display: block;
  padding: 16px 20px;
  border-bottom: 1px solid #f8f8f8;
  border-right: 1px solid #f8f8f8;
}

.mc-popular-item:nth-child(2n) {
  border-right: none;
}

.mc-popular-item:nth-last-child(-n + 2) {
  border-bottom: none;
}

.mc-popular-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(145deg, #e8f5e9, #f0f0f0);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--theme-primary);
}

.mc-popular-title {
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 800;
  color: #222;
  line-height: 1.4;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mc-popular-meta {
  font-size: 12px;
  color: #999;
}

/* Recent list */
.mc-recent-list {
  list-style: none;
}

.mc-recent-item {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid #f8f8f8;
  font-size: 14px;
}

.mc-recent-item:last-child {
  border-bottom: none;
}

.mc-recent-category {
  display: inline-block;
  padding: 2px 8px;
  background: #f5f5f5;
  color: #666;
  font-size: 11px;
  border-radius: 3px;
  margin-right: 8px;
  flex-shrink: 0;
}

.mc-recent-title {
  flex: 1;
  font-family: var(--font-body);
  font-size: 16px;
  color: #222;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mc-recent-date {
  font-size: 12px;
  color: #999;
  flex-shrink: 0;
  margin-left: 12px;
}

/* Sidebar */
.mc-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mc-sidebar-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  padding: 24px 20px;
  text-align: center;
}

.mc-cafe-logo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin: 0 auto 12px;
  background: #e8f5e9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: var(--theme-primary);
  overflow: hidden;
}

.mc-cafe-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mc-cafe-name {
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 800;
  color: #222;
  margin-bottom: 6px;
}

.mc-cafe-desc {
  font-size: 13px;
  color: #888;
  margin-bottom: 16px;
  line-height: 1.5;
}

.mc-join-btn {
  display: block;
  width: 100%;
  padding: 10px;
  background: var(--theme-primary);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  border: none;
  border-radius: 6px;
}

.mc-side-content {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  padding: 20px;
}

.mc-tag-title {
  font-size: 14px;
  font-weight: 700;
  color: #333;
  margin-bottom: 10px;
  text-align: left;
}

.mc-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mc-tag {
  display: inline-block;
  padding: 5px 12px;
  background: #f5f6f8;
  border-radius: 20px;
  font-size: 12px;
  color: #555;
}

.empty {
  padding: 32px 20px;
  text-align: center;
  color: #999;
  font-size: 14px;
  grid-column: 1 / -1;
}

@media (max-width: 768px) {
  .mc-banner-fallback {
    padding: 44px 16px;
  }

  .mc-banner-fallback h1 {
    font-size: 24px;
  }

  .mc-main {
    grid-template-columns: 1fr;
    padding: 12px 12px 40px;
    margin-top: 12px;
  }

  .mc-sidebar {
    display: none;
  }

  .mc-popular-grid {
    grid-template-columns: 1fr;
  }

  .mc-popular-item {
    border-right: none;
  }

  .mc-popular-item:nth-last-child(-n + 2) {
    border-bottom: 1px solid #f8f8f8;
  }

  .mc-popular-item:last-child {
    border-bottom: none;
  }
}
