/* 기술 글(tech) 스킨 — 매거진 상세 CSS(magazine.css · magazine.extra.css 복사) + ATOREUM 시안 목록 카드. 상세 마크업이 매거진과 같다 */
/* 목록 — design/main-b.html 매거진 */
/* 매거진 */
  .mag-wrap { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 32px; }
.cats { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 84px; align-self: start; }
.cats a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; font-weight: 600; color: var(--text-2); font-size: 14.5px; white-space: nowrap; }
.cats a.on, .cats a:hover { background: var(--surface-2); color: var(--text); }
.cats a.on svg.lucide { color: var(--brand); }
.cats .sub { padding-left: 34px; font-size: 13px; font-weight: 500; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px 18px; }
.art .thumb { aspect-ratio: 4 / 3; transition: transform .2s; }
.art:hover .thumb { transform: translateY(-3px); }
.art .who { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); margin: 12px 0 6px; }
.art .who .av { width: 18px; height: 18px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--violet)); }
.art h4 { font-size: 15.5px; line-height: 1.4; letter-spacing: -0.02em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.art:hover h4 { text-decoration: underline; text-underline-offset: 3px; }
.art p { font-size: 13px; color: var(--text-3); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.art .tg { display: flex; gap: 8px; margin-top: 8px; font-size: 12px; color: var(--brand-ink); }
@media (max-width: 1100px) {
  .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mag-wrap { grid-template-columns: 1fr; }
  .cats { position: static; flex-direction: row; overflow-x: auto; }
  .cats .sub { display: none; }
}
@media (max-width: 760px) {
  .grid4 { grid-template-columns: 1fr; }
}

/* 상세 — design/b-article.html (범위 .mg-article) */
.mg-article .progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--brand); z-index: 60; }.mg-article .a-head { max-width: 860px; margin: 40px auto 0; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 16px; }.mg-article .a-head .crumb { justify-content: center; }.mg-article .a-head h1 { font-size: clamp(28px, 4vw, 44px); line-height: 1.22; letter-spacing: -0.045em; font-weight: 900; }.mg-article .a-head .dek { font-size: 17.5px; color: var(--text-2); max-width: 680px; line-height: 1.6; }.mg-article .author { display: flex; align-items: center; gap: 12px; font-size: 13.5px; color: var(--text-2); }.mg-article .author .av { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--violet)); }.mg-article .author b { color: var(--text); display: block; font-size: 14.5px; }.mg-article .author .dotsep { width: 3px; height: 3px; border-radius: 50%; background: var(--text-3); }.mg-article .hero-img { margin: 36px auto 0; max-width: 1120px; border-radius: 20px; overflow: hidden; aspect-ratio: 21 / 9; position: relative; background: radial-gradient(120% 140% at 80% 10%, #17336e, #111622 55%, #121214); border: 1px solid var(--line); }.mg-article .hero-img svg { position: absolute; inset: 0; width: 100%; height: 100%; }.mg-article .credit { max-width: 1120px; margin: 8px auto 0; font-size: 12px; color: var(--text-3); text-align: right; }.mg-article .a-grid { max-width: 1240px; margin: 40px auto 0; display: grid; grid-template-columns: 200px minmax(0, 720px) 300px; gap: 48px; justify-content: center; }.mg-article .toc { position: sticky; top: 96px; align-self: start; display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; }.mg-article .toc .h { font-size: 12px; font-weight: 800; letter-spacing: .1em; color: var(--text-3); margin-bottom: 8px; }.mg-article .toc a { padding: 6px 0 6px 12px; border-left: 2px solid var(--line); color: var(--text-3); }.mg-article .toc a.on { color: var(--text); border-color: var(--brand); font-weight: 700; }.mg-article .toc .share { display: flex; gap: 6px; margin-top: 20px; }.mg-article .toc .share button { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); display: grid; place-items: center; color: var(--text-2); }.mg-article .body { font-size: 17px; line-height: 1.85; color: #dedce3; }[data-theme="light"] .mg-article .body { color: #2a2930; }.mg-article .body > * + * { margin-top: 22px; }.mg-article .body h2 { font-size: 25px; line-height: 1.35; letter-spacing: -0.035em; color: var(--text); margin-top: 52px; scroll-margin-top: 90px; }.mg-article .body h3 { font-size: 19px; color: var(--text); margin-top: 32px; }.mg-article .body strong { color: var(--text); }.mg-article .body mark { background: linear-gradient(transparent 60%, rgba(91,140,255,.35) 60%); color: inherit; }.mg-article .body a.lnk { color: var(--brand-ink); text-decoration: underline; text-underline-offset: 3px; }.mg-article .body blockquote { border-left: 3px solid var(--brand); padding: 4px 0 4px 22px; font-size: 22px; line-height: 1.55; font-weight: 700; color: var(--text); letter-spacing: -0.02em; }.mg-article .body blockquote cite { display: block; font-size: 13px; font-weight: 500; color: var(--text-3); margin-top: 8px; font-style: normal; }.mg-article .body ul, .mg-article .body ol { padding-left: 22px; }.mg-article .body li + li { margin-top: 8px; }.mg-article .summary { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; font-size: 15px; line-height: 1.7; }.mg-article .summary .t { display: flex; align-items: center; gap: 8px; font-weight: 800; color: var(--brand-ink); font-size: 13px; letter-spacing: .06em; margin-bottom: 8px; }.mg-article .summary ul { padding-left: 18px; }.mg-article figure .fig { border-radius: 14px; overflow: hidden; aspect-ratio: 16 / 9; }.mg-article figure figcaption { font-size: 13px; color: var(--text-3); margin-top: 10px; text-align: center; }.mg-article .embed { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 6px 16px; font-size: 15px; line-height: 1.5; }.mg-article .embed-h { display: flex; align-items: center; gap: 8px; padding: 12px 6px 4px; font-size: 13px; font-weight: 700; color: var(--text-2); }.mg-article .embed-h a { margin-left: auto; color: var(--brand-ink); font-size: 12.5px; }.mg-article .embed .track { grid-template-columns: 40px minmax(120px, 200px) 1fr auto; }.mg-article .tool-embed { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: 16px; border: 1px solid var(--brand); background: linear-gradient(110deg, var(--brand-soft), var(--surface) 70%); line-height: 1.5; }.mg-article .tool-embed .ti { width: 48px; height: 48px; border-radius: 14px; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; flex: none; }.mg-article .tool-embed b { color: var(--text); font-size: 16px; display: block; }.mg-article .tool-embed small { font-size: 13.5px; color: var(--text-2); }.mg-article .tool-embed .btn { margin-left: auto; }.mg-article .ad-inline { min-height: 120px; }.mg-article .tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; }.mg-article .tags a { font-size: 13px; padding: 6px 12px; border-radius: 99px; background: var(--surface-2); color: var(--text-2); }.mg-article .react { display: flex; justify-content: center; gap: 10px; margin: 36px 0; }.mg-article .react button { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 99px; border: 1px solid var(--line); font-weight: 700; font-size: 14px; }.mg-article .react button.on { border-color: var(--brand); color: var(--brand-ink); background: var(--brand-soft); }.mg-article .author-box { display: flex; gap: 16px; padding: 22px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); align-items: flex-start; }.mg-article .author-box .av { width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--violet)); flex: none; }.mg-article .author-box p { font-size: 14px; color: var(--text-2); margin-top: 4px; }.mg-article .comments { margin-top: 48px; }.mg-article .comments h3 { font-size: 18px; margin-bottom: 14px; }.mg-article .cbox { display: flex; gap: 10px; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); margin-bottom: 18px; }.mg-article .cbox input { flex: 1; background: none; border: 0; outline: 0; color: var(--text); font: inherit; font-size: 14.5px; }.mg-article .cm { display: flex; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); font-size: 14.5px; }.mg-article .cm .pav { width: 34px; height: 34px; font-size: 13px; }.mg-article .cm .meta2 { font-size: 12.5px; color: var(--text-3); margin-bottom: 4px; }.mg-article .cm .meta2 b { color: var(--text); margin-right: 6px; }.mg-article .cm .cact { display: flex; gap: 14px; font-size: 12.5px; color: var(--text-3); margin-top: 6px; }.mg-article .r-rail { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 96px; align-self: start; }.mg-article .r-rail .card { padding: 18px; }.mg-article .r-rail h4 { font-size: 14.5px; margin-bottom: 12px; }.mg-article .pop { display: grid; grid-template-columns: 20px 1fr; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 13.5px; line-height: 1.45; font-weight: 600; }.mg-article .pop:first-of-type { border-top: 0; }.mg-article .pop span { color: var(--brand); font-weight: 900; }.mg-article .ad-rect { min-height: 250px; }.mg-article .related { max-width: 1240px; margin: 72px auto 0; padding-top: 40px; border-top: 1px solid var(--line); }.mg-article .grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }.mg-article .art .thumb { aspect-ratio: 4 / 3; }.mg-article .art .who { font-size: 12px; color: var(--text-3); margin: 12px 0 6px; }.mg-article .art h4 { font-size: 15px; line-height: 1.4; }

  @media (max-width: 1200px) {.mg-article .a-grid { grid-template-columns: minmax(0, 720px) 280px; }.mg-article .toc { display: none; } }
  @media (max-width: 900px) {.mg-article .a-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }.mg-article .r-rail { position: static; }.mg-article .grid4 { grid-template-columns: 1fr 1fr; }.mg-article .hero-img { aspect-ratio: 16 / 10; border-radius: 0; }.mg-article .tool-embed { flex-wrap: wrap; }.mg-article .tool-embed .btn { margin-left: 0; }
  }

/* ── magazine.extra.css ── */
/* 매거진 스킨 추가 규칙 (시안 CSS 뒤에 붙음) */
.cats svg { width: 16px; height: 16px; }
.cats .sub { padding-left: 34px; }
.cats-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; padding: 12px 10px 0; border-top: 1px solid var(--line); }
.cats-tags a { padding: 4px 9px !important; border-radius: 99px !important; font-size: 12px !important; font-weight: 600; background: var(--surface-2); }
.cats-tags a.on { background: var(--brand-soft); color: var(--brand-ink); }
.art .thumb { position: relative; display: grid; place-items: center; overflow: hidden; border-radius: 12px; }
.art .thumb.has-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.art .thumb .ico svg { width: 40px; height: 40px; opacity: .9; color: #fff; }
.art h4 svg { width: 14px; height: 14px; margin-right: 4px; vertical-align: -1px; }
.sec-h .hx-sort { margin-left: auto; }
/* 상세 (.mg-article) — 에디터 본문 요소 · 버튼 · 폼 */
.mg-article .crumb svg { width: 14px; height: 14px; }
.mg-article .author svg { width: 14px; height: 14px; vertical-align: -2px; }
.mg-article .body img { border-radius: 14px; max-width: 100%; height: auto; }
.mg-article .body pre { font-family: ui-monospace, Consolas, monospace; font-size: 13.5px; background: var(--surface-2); border-radius: 12px; padding: 14px; overflow-x: auto; white-space: pre-wrap; }
.mg-article .body a { color: var(--brand-ink); text-decoration: underline; text-underline-offset: 3px; }
.mg-article .body iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 14px; }
.mg-article .summary .t svg { width: 15px; height: 15px; }
.mg-article .toc .share form { margin: 0; }
.mg-article .toc .share button, .mg-article .toc .share .sharebtn { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); display: grid; place-items: center; color: var(--text-2); background: none; cursor: pointer; }
.mg-article .toc .share svg { width: 16px; height: 16px; }
.mg-article .react form { margin: 0; }
.mg-article .react button, .mg-article .react .hx-pill { background: none; color: var(--text); cursor: pointer; font: inherit; font-weight: 700; }
.mg-article .react svg { width: 16px; height: 16px; }
.mg-article .cbox textarea, .mg-article .cbox input { flex: 1; background: none; border: 0; outline: 0; color: var(--text); font: inherit; font-size: 14.5px; }
.mg-article .cact details { display: inline; }
.mg-article .cact summary, .mg-article .cact .linkbtn { cursor: pointer; background: none; border: 0; color: var(--text-3); font: inherit; }
.mg-article .cact form { margin: 0; display: inline; }
.mg-article .art .thumb { display: grid; place-items: center; border-radius: 12px; color: #fff; }
.mg-article .art .thumb svg { width: 32px; height: 32px; }
.mg-article .hx-lock__box { margin-top: 20px; }

/* 좁은 화면: 분류 줄(가로 넘김) · 카드 한 줄 문구가 칸을 넓혀 화면이 옆으로 밀리던 것 */
@media (max-width: 1100px) {
  .mag-wrap { grid-template-columns: minmax(0, 1fr); }
  .cats { min-width: 0; scrollbar-width: none; }
  .cats::-webkit-scrollbar { display: none; }
}
@media (max-width: 760px) { .grid4 { grid-template-columns: minmax(0, 1fr); } }
/* 매거진 스킨 추가 규칙 (시안 CSS 뒤에 붙음) */
.cats svg { width: 16px; height: 16px; }
.cats .sub { padding-left: 34px; }
.cats-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; padding: 12px 10px 0; border-top: 1px solid var(--line); }
.cats-tags a { padding: 4px 9px !important; border-radius: 99px !important; font-size: 12px !important; font-weight: 600; background: var(--surface-2); }
.cats-tags a.on { background: var(--brand-soft); color: var(--brand-ink); }
.art .thumb { position: relative; display: grid; place-items: center; overflow: hidden; border-radius: 12px; }
.art .thumb.has-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.art .thumb .ico svg { width: 40px; height: 40px; opacity: .9; color: #fff; }
.art h4 svg { width: 14px; height: 14px; margin-right: 4px; vertical-align: -1px; }
.sec-h .hx-sort { margin-left: auto; }
/* 상세 (.mg-article) — 에디터 본문 요소 · 버튼 · 폼 */
.mg-article .crumb svg { width: 14px; height: 14px; }
.mg-article .author svg { width: 14px; height: 14px; vertical-align: -2px; }
.mg-article .body img { border-radius: 14px; max-width: 100%; height: auto; }
.mg-article .body pre { font-family: ui-monospace, Consolas, monospace; font-size: 13.5px; background: var(--surface-2); border-radius: 12px; padding: 14px; overflow-x: auto; white-space: pre-wrap; }
.mg-article .body a { color: var(--brand-ink); text-decoration: underline; text-underline-offset: 3px; }
.mg-article .body iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 14px; }
.mg-article .summary .t svg { width: 15px; height: 15px; }
.mg-article .toc .share form { margin: 0; }
.mg-article .toc .share button, .mg-article .toc .share .sharebtn { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); display: grid; place-items: center; color: var(--text-2); background: none; cursor: pointer; }
.mg-article .toc .share svg { width: 16px; height: 16px; }
.mg-article .react form { margin: 0; }
.mg-article .react button, .mg-article .react .hx-pill { background: none; color: var(--text); cursor: pointer; font: inherit; font-weight: 700; }
.mg-article .react svg { width: 16px; height: 16px; }
.mg-article .cbox textarea, .mg-article .cbox input { flex: 1; background: none; border: 0; outline: 0; color: var(--text); font: inherit; font-size: 14.5px; }
.mg-article .cact details { display: inline; }
.mg-article .cact summary, .mg-article .cact .linkbtn { cursor: pointer; background: none; border: 0; color: var(--text-3); font: inherit; }
.mg-article .cact form { margin: 0; display: inline; }
.mg-article .art .thumb { display: grid; place-items: center; border-radius: 12px; color: #fff; }
.mg-article .art .thumb svg { width: 32px; height: 32px; }
.mg-article .hx-lock__box { margin-top: 20px; }

/* 좁은 화면: 분류 줄(가로 넘김) · 카드 한 줄 문구가 칸을 넓혀 화면이 옆으로 밀리던 것 */
@media (max-width: 1100px) {
  .mag-wrap { grid-template-columns: minmax(0, 1fr); }
  .cats { min-width: 0; scrollbar-width: none; }
  .cats::-webkit-scrollbar { display: none; }
}
@media (max-width: 760px) { .grid4 { grid-template-columns: minmax(0, 1fr); } }

/* ───── ATOREUM 기술 글 목록 (design/atoreum-main.html) ───── */
.cat-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 18px; }
.grid3 .art .thumb { aspect-ratio: 16 / 9; transition: transform .2s; }
.grid3 .art .thumb.has-img { background: var(--surface-2); }
.grid3 .art .thumb img { width: 100%; height: 100%; object-fit: cover; }
.grid3 .art:hover .thumb { transform: translateY(-3px); }
.art .src { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); margin: 12px 0 6px; min-width: 0; }
.fav { width: 18px; height: 18px; border-radius: 5px; display: inline-grid; place-items: center; font-size: 9px; font-weight: 900; color: #fff; flex: none; }
.art .src .org { margin-left: auto; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 99px; border: 1px solid var(--line); color: var(--text-2); white-space: nowrap; }
.art .src .org.mine { border-color: var(--brand); color: var(--brand-ink); }
.grid3 .art h4 { font-size: 16px; line-height: 1.4; letter-spacing: -0.02em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.grid3 .art p { font-size: 13px; color: var(--text-3); margin-top: 5px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.art .tg .cm { margin-left: auto; color: var(--text-3); display: flex; align-items: center; gap: 4px; }
.art .tg svg { width: 13px; height: 13px; }
.ad-infeed { grid-column: 1 / -1; }
.tags-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.tags-cloud a { font-size: 13px; padding: 6px 11px; border-radius: 99px; background: var(--surface-2); color: var(--text-2); font-weight: 600; }
.tags-cloud a:hover, .tags-cloud a.on { color: var(--brand-ink); }

/* 상세 — 원문 카드 · 요약 인용 */
.tf-origin { display: flex; align-items: center; gap: 14px; margin: 28px 0 8px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); text-decoration: none !important; color: var(--text) !important; }
.tf-origin:hover { border-color: var(--brand); }
.tf-origin .fav { width: 36px; height: 36px; border-radius: 10px; font-size: 13px; }
.tf-origin .t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tf-origin small { color: var(--text-3); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tf-origin svg { width: 18px; height: 18px; color: var(--brand); }
.tf-note { font-size: 12.5px; color: var(--text-3); }
.body blockquote.tf-summary { border-left: 3px solid var(--brand); background: var(--surface); padding: 14px 18px; border-radius: 0 12px 12px 0; margin: 18px 0; color: var(--text-2); }
.body p.tf-source { display: none; } /* 본문 끝 원문 줄은 위 카드로 대신 보여 준다 (다른 화면 · RSS 에서는 그대로) */

@media (max-width: 980px) { .grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid3 { grid-template-columns: 1fr; } }

/* 원문 삭제됨 (링크 점검) — 아카이브 보관본 안내 */
.tf-origin.is-gone { border-style: dashed; }
.tf-origin.is-gone b { color: var(--text-2); }

/* 모바일 — 글 영역이 원문 주소·코드 길이만큼 늘어나 가로 스크롤이 생기지 않게 */
.mg-article .a-grid > * { min-width: 0; }
.mg-article .body { overflow-wrap: anywhere; }
.mg-article .body table { display: block; max-width: 100%; overflow-x: auto; }
@media (max-width: 640px) {
  .mg-article .a-head { margin-top: 24px; }
  .mg-article .a-head h1 { font-size: 24px; }
  .mg-article .a-head .dek { font-size: 15.5px; }
  .mg-article .author { flex-wrap: wrap; justify-content: center; row-gap: 6px; }
  .mg-article .body { font-size: 16px; }
  .tf-origin { padding: 14px; gap: 12px; }
}

/* 글 머리 작성자 줄 — 작성자 블록 + 메타(날짜 · 읽기 · 조회) 칩 */
.mg-article .author { flex-wrap: wrap; justify-content: center; gap: 12px 20px; }
.mg-article .author .who { display: flex; align-items: center; gap: 10px; text-align: left; }
.mg-article .author .who-t { display: flex; flex-direction: column; line-height: 1.35; }
.mg-article .author .who-t span { font-size: 12.5px; color: var(--text-3); }
.mg-article .author .meta { display: flex; align-items: center; gap: 14px; color: var(--text-3); font-size: 13px; }
.mg-article .author .meta span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.mg-article .author .meta svg { width: 14px; height: 14px; }
@media (min-width: 641px) { .mg-article .author .meta { padding-left: 20px; border-left: 1px solid var(--line); } }
@media (max-width: 640px) {
  .mg-article .author { flex-direction: column; gap: 14px; width: 100%; }
  .mg-article .author .who { align-self: center; }
  .mg-article .author .av { width: 36px; height: 36px; }
  .mg-article .author .meta { width: 100%; justify-content: center; gap: 0; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .mg-article .author .meta span { flex: 1; justify-content: center; }
  .mg-article .author .meta span + span { border-left: 1px solid var(--line); }
}
