@charset "utf-8";

:root{
  --mag-primary:#111111;
  --mag-primary-hover:#222222;
  --mag-gray-50:#f9f9f9;
  --mag-gray-100:#f3f4f6;
  --mag-gray-200:#e5e7eb;
  --mag-gray-300:#d1d5db;
  --mag-gray-400:#9ca3af;
  --mag-gray-500:#6b7280;
  --mag-gray-600:#111;
  --mag-gray-700:#374151;
  --mag-gray-800:#1f2937;
  --mag-gray-900:#111827;
  --mag-border:#e7e7e7;
  --mag-radius:18px;
  --mag-shadow:0 10px 30px rgba(0,0,0,.06);
}

*{
  box-sizing:border-box;
}

.mag-view{
  max-width:1280px;
  margin:0 auto;
  padding:0 24px 40px;
  color:var(--mag-gray-800);
  word-break:break-word;
  overflow-wrap:anywhere;
}

.sb-view-icon{
  width:24px;
  height:24px;
  display:block;
}

/* hero */
.mag-hero{
  position:relative;
  overflow:hidden;
  border-radius:32px;
  min-height:300px;
  margin-bottom:18px;
  background-color:#ddd;
  background-position:center;
  background-repeat:no-repeat;
  background-size:cover;
}

.mag-hero.no-bg{
  background:linear-gradient(135deg, #d9d9d9 0%, #bdbdbd 100%);
}

.mag-hero-dim{
  position:absolute;
  inset:0;
  background:linear-gradient(to top, rgba(0,0,0,.42) 0%, rgba(0,0,0,.18) 35%, rgba(0,0,0,.05) 100%);
}

.mag-hero-inner{
  position:relative;
  z-index:2;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  min-height:300px;
  padding:28px 28px 34px;
}

.mag-hero-top{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
}

.mag-hero-badge-wrap{
  width: 100%;
  display: flex;
  justify-content: flex-start;
  pointer-events: none;
}

.mag-badge-new{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:38px;
  padding:0 18px;
  border-radius:999px;
  background:#fff;
  color:#111;
  font-size:15px;
  font-weight:600;
  box-shadow:0 8px 20px rgba(0,0,0,.08);
}

.mag-hero-actions{
  display:flex;
  gap:8px;
  margin-left:auto;
}

.mag-hero-actions a{
  width: 38px;
  height: 38px;
  font-size: 14px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #fff;
  transition: .2s ease;
}

.mag-hero-actions a:hover{
  transform:translateY(-1px);
  background:#fff;
}

.mag-hero-content{
  max-width:980px;
  margin:0 auto;
  width:100%;
  text-align:center;
}

.mag-title{
  margin:0;
  color:#fff;
  font-size:50px;
  line-height:1.18;
  font-weight:600;
  letter-spacing:-0.04em;
  word-break:keep-all;
  text-shadow:0 4px 16px rgba(0,0,0,.16);
}

.mag-hash-list{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:10px;
  margin-top:22px;
}

.mag-hash-chip{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 5px;
  color: rgba(255, 255, 255, .88);
  font-size: 17px;
  font-weight: 600;
}

/* meta */
.mag-meta-bar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  padding:10px 20px;
  margin-bottom:24px;
  border-radius:22px;
  background:#f3f3f3;
}

.mag-meta-left{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}

.mag-author-avatar{
  width:46px;
  height:46px;
  border-radius:50%;
  overflow:hidden;
  flex:0 0 46px;
  background:#d9d9d9;
  display:flex;
  align-items:center;
  justify-content:center;
}

.mag-author-avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.mag-author-avatar-fallback{
  font-size:24px;
  line-height:1;
}

.mag-author-name{
  font-size:20px;
  font-weight:600;
  color:#111;
}

.mag-meta-right{
  display:flex;
  align-items:center;
  gap:12px;
  color:#7b7b7b;
  font-size:15px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.mag-meta-item{
  white-space:nowrap;
}

.mag-meta-dot{
  width:4px;
  height:4px;
  border-radius:50%;
  background:#b7b7b7;
}

/* body */
.mag-body-wrap{
  margin-bottom:24px;
}

.mag-video-wrap{
  margin-bottom:20px;
}

.mag-video-box iframe{
  width:100%;
  height:auto;
  aspect-ratio:16 / 9;
  border:0;
  border-radius:22px;
  display:block;
}

.mag-article {
    text-align: center;
}

.mag-article h1,
.mag-article h2,
.mag-article h3,
.mag-article h4{
  color:#111;
  line-height:1.35;
}

.mag-article h2{
  margin:28px 0 16px;
  font-size:28px;
  font-weight:600;
}

.mag-article h3{
  margin:24px 0 12px;
  font-size:22px;
  font-weight:600;
}

.mag-article p{
  margin-bottom:18px;
  font-size:17px;
  line-height:1.8;
  color:#333;
}

.mag-article ul,
.mag-article ol{
  margin:18px 0;
  padding-left:24px;
}

.mag-article li{
  margin-bottom:8px;
  line-height:1.75;
}

.mag-article blockquote{
  margin:24px 0;
  padding:16px 18px;
  border-left:4px solid #111;
  background:#f8f8f8;
  color:#555;
}

.mag-article img,
.mag-article iframe,
.mag-article video{
  max-width:100%;
  height:auto;
}

.mag-article a{
  color:#1f4f9b;
  text-decoration:underline;
}

/* attach */
.mag-attach{
  margin-bottom:24px;
  padding:20px 24px;
  border:1px solid var(--mag-border);
  border-radius:20px;
  background:#fafafa;
}

.mag-attach-title{
  margin-bottom:12px;
  font-size:18px;
  font-weight:600;
  color:#111;
}

.mag-attach-list{
  list-style:none;
  margin:0;
  padding:0;
}

.mag-attach-item + .mag-attach-item{
  margin-top:10px;
}

.mag-attach-link{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 14px;
  border-radius:14px;
  background:#fff;
  border:1px solid var(--mag-border);
  text-decoration:none;
  color:#222;
}

.mag-attach-name{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.mag-attach-meta{
  flex-shrink:0;
  font-size:13px;
  color:#777;
}

/* post nav */
.mag-postnav{
  margin:24px 0;
  border-top:1px solid #dadada;
}

.mag-postnav ul{
  list-style:none;
  margin:0;
  padding:0;
}

.mag-postnav a{
  font-size:16px;
  display:flex;
  align-items:center;
  gap:12px;
  padding:16px 0;
  text-decoration:none;
  color:#111;
}

.mag-postnav a:hover{
  background:#fafafa;
}

.mag-postnav-move{
  width:15px;
  flex:0 0 15px;
}

.mag-postnav-title{
  flex:1;
  font-weight:500;
}

.mag-postnav-date{
  font-size:14px;
  color:#667085;
}

/* bottom buttons */
.mag-actions-bottom{
  margin-top:20px;
}

.mag-actions-bottom-inner{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
}

.mag-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:46px;
  padding:0 18px;
  border-radius:14px;
  background:#111;
  color:#fff;
  text-decoration:none;
  font-size:15px;
  font-weight:600;
  transition:.2s ease;
}

.mag-btn:hover{
  transform:translateY(-1px);
  background:#111;
  color:#fff;
}

.mag-btn-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.mag-btn-text{
  display:inline-block;
}

@media (max-width: 768px){

  /* 전체 */
  .mag-view{
    padding:0 14px 28px;
  }

  .mag-hero{
    min-height: 170px;
    border-radius: 18px;
    margin-bottom: 10px;
  }

  .mag-hero-inner{
    min-height:170px;
    padding:16px 14px 18px;
  }

  .mag-hero-top{
    flex-direction:row;
    align-items:center;
  }

  .mag-hero-badge-wrap{
    justify-content:flex-start;
  }

  .mag-hero-actions a{
    width: 30px;
    height: 25px;
    font-size: 12px;
  }

  .mag-badge-new{
    min-height: 20px;
    font-size: 14px;
    padding: 2px 10px;
  }
  /* 제목 */
  .mag-title{
    font-size:22px;
    line-height:1.35;
  }

  /* 해시태그 */
  .mag-hash-list{
    gap:6px;
    margin-top:10px;
  }

  .mag-hash-chip{
    font-size:12px;
    padding:0 8px;
    min-height: 24px;
  }

  .mag-meta-bar{
    flex-direction:column;
    align-items:flex-start;
    gap:8px;
    padding:12px 14px;
    margin-bottom: 10px;
  }
  .mag-body-wrap{
    margin-bottom: 10px;
  }
  .mag-postnav{
    margin: 10px 0;
  }
  .mag-meta-right{
    justify-content:flex-start;
    font-size:12px;
  }

  .mag-author-name{
    font-size:16px;
  }

  /* 영상 */
  .mag-video-box iframe{
    border-radius:14px;
  }

  /* 본문 */
  .mag-article{
    padding:0px;
    border-radius:16px;
  }

  .mag-article p{
    font-size:14px;
    line-height:1.7;
  }

  .mag-article h2{
    font-size:20px;
  }

  .mag-article h3{
    font-size:17px;
  }

  /* 이미지 여백 줄이기 */
  .mag-article img{
    /* border-radius:12px; */
  }

  /* 첨부파일 */
  .mag-attach{
    padding:14px;
  }

  .mag-attach-title{
    font-size:15px;
  }

  .mag-attach-link{
    padding:10px 12px;
    font-size:13px;
  }

  /* 이전/다음글 */
  .mag-postnav a{
    flex-direction:column;
    align-items:flex-start;
    gap:6px;
    padding: 0;
  }

  .mag-postnav-title{
    font-size:13px;
  }

  .mag-postnav-date{
    font-size:11px;
  }

  .mag-actions-bottom-inner{
    gap:8px;
  }

  .mag-btn{
    color: #fff !important;
    width:100%;
    min-height:44px;
    font-size:14px;
  }
}
