* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #1c1b19;
  background: #fff;
}

.md-intro {
  padding: 88px 80px 44px;
  margin-top: 64px;
  max-width: 1500px;
  margin-left: auto;
  margin-right: auto;
}
.md-label {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #BC8B55;
  margin-bottom: 16px;
  letter-spacing: .06em;
}
.md-intro h1 {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(34px, 5vw, 70px);
  margin: 0 0 14px;
  line-height: 1.03;
}
.md-intro p {
  margin: 0;
  font-size: 20px;
  color: #6b6762;
}

.md-toolbar {
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 80px 24px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}
.md-search {
  height: 40px;
  width: 260px;
  border: 1px solid #e3dcd5;
  padding: 0 12px;
  font-size: 14px;
  outline: none;
}

.md-card {
  display: block;
  text-decoration: none;
  color: inherit;
}
.md-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  
}
.md-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .32s ease;
}
.md-card:hover .md-thumb img { transform: scale(1.03); }

.md-body { padding: 14px 4px 4px; }
.md-cat {
  font-size: 11px;
  letter-spacing: .08em;
  color: #a5a09a;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.md-title {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 6px;
}
.md-subtitle {
  font-size: 14px;
  color: #6b6762;
  line-height: 1.6;
  margin-bottom: 8px;
}
.md-date {
  font-size: 12px;
  color: #a5a09a;
}

.md-section { margin-top: 16px; }
.md-section-hd {
  max-width: 1500px;
  margin: 0 auto;
  padding: 64px 80px 36px;
}
#media-section .md-section-hd {
  border-top: 1px solid #e3dcd5;
}
.md-section-tag {
  display: inline-block;
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  color: #c3a679;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.md-section-title {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(28px, 3.5vw, 52px);
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 10px;
}
.md-section-desc {
  font-size: 17px;
  color: #6b6762;
  margin: 0;
}

.md-grid {
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 80px 80px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.md-empty {
  max-width: 1500px;
  margin: 0 auto;
  padding: 24px 80px 96px;
  color: #a5a09a;
  font-size: 15px;
}

.md-popup {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .88);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1200;
  padding: 32px;
}
.md-popup.open { display: flex; }

.md-popup-card {
  width: min(720px, calc(100vw - 64px));
  max-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  background: #000;
  box-shadow: 0 24px 80px rgba(0,0,0,.38);
  overflow: hidden;
}

/* 상단 헤더 */
.md-popup-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(8px);
}
.md-popup-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.md-popup-cat {
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #c3a679;
  font-weight: 600;
}
.md-popup-title {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
}
.md-popup-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.md-popup-link {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  color: rgba(255,255,255,.75);
  border: 1px solid rgba(255,255,255,.3);
  padding: 6px 14px;
  transition: all .2s;
  text-decoration: none;
}
.md-popup-link:hover { color: #fff; border-color: #fff; }
.md-popup-close {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255,255,255,.3);
  background: transparent;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}
.md-popup-close:hover { background: rgba(255,255,255,.15); }

/* 이미지 영역 */
.md-popup-view {
  flex: 1;
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background: #000;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.md-popup-view::-webkit-scrollbar { display: none; }
.md-popup-view.is-loading img {
  opacity: .42;
  filter: blur(8px);
  transform: scale(1.01);
}
.md-popup-view img {
  width: 100%;
  height: auto;
  max-width: 720px;
  max-height: none;
  display: block;
  user-select: none;
  object-fit: contain;
  transition: opacity .18s ease, filter .18s ease, transform .18s ease;
}
.md-popup-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 160px;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(0,0,0,.52);
  color: rgba(255,255,255,.88);
  font-size: 13px;
  text-align: center;
  letter-spacing: .02em;
  pointer-events: none;
  z-index: 2;
}
.md-popup-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(0,0,0,.5);
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
  z-index: 10;
}
.md-popup-nav:hover { background: rgba(0,0,0,.8); }
.md-popup-prev { left: 16px; }
.md-popup-next { right: 16px; }

@media (max-width: 1024px) {
  .md-intro { padding: 72px 48px 36px; }
  .md-toolbar { padding: 0 48px 20px; }
  .md-section-hd { padding: 48px 48px 28px; }
  .md-grid { grid-template-columns: repeat(2, 1fr); padding: 0 48px 64px; gap: 20px; }
  .md-empty { padding: 22px 48px 80px; }
}

@media (max-width: 768px) {
  .md-intro { padding: 56px 24px 28px; }
  .md-intro p { font-size: 18px; line-height: 1.6; }
  .md-toolbar { padding: 0 24px 16px; justify-content: flex-start; }
  .md-search { width: 100%; }
  .md-section-hd { padding: 40px 24px 24px; }
  .md-section-title { font-size: 28px; }
  .md-grid { grid-template-columns: repeat(2, 1fr); padding: 0 24px 48px; gap: 14px; }
  .md-title { font-size: 16px; }
  .md-empty { padding: 18px 24px 64px; }
  .md-popup { padding: 16px; }
  .md-popup-card { width: min(100%, calc(100vw - 32px)); max-height: calc(100vh - 32px); }
  .md-popup-title { font-size: 15px; }
  .md-popup-header { padding: 12px 16px; }
  .md-popup-nav { width: 36px; height: 36px; font-size: 20px; }
}
