@font-face {
  font-family: "Pretendard Variable";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/PretendardVariable.woff2") format("woff2");
}

:root {
  --bg: #ffffff;
  --soft: #f5f5f7;
  --soft-2: #fafafc;
  --ink: #1d1d1f;
  --ink-2: #333336;
  --muted: #6e6e73;
  --faint: #86868b;
  --line: #e0e0e0;
  --line-2: #d2d2d7;
  --link: #0066cc;
  --focus: #0071e3;
  --wrap: 1148px;
  --gutter: 20px;
  --side: 300px;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
}
@media (max-width: 599px) { :root { --gutter: 16px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea, table, code, kbd, pre, samp { font-family: inherit; }
code, kbd, pre, samp { font-size: inherit; }
img, svg, video { max-width: 100%; height: auto; }
a { color: var(--link); text-decoration: none; text-underline-offset: .18em; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 2px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  padding: 8px 12px; background: var(--ink); color: #fff; font-size: 14px; border-radius: 4px;
}
.skip-link:focus { top: 12px; color: #fff; }

/* Masthead */
.masthead { border-bottom: 1px solid var(--line); background: var(--bg); }
.masthead__top {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px;
  padding-top: 26px; padding-bottom: 18px;
}
.masthead__title { margin: 0; font-size: 26px; font-weight: 700; line-height: 1.3; letter-spacing: -.03em; }
.masthead__title a { color: var(--ink); text-decoration: none; }
.masthead__desc { margin: 0; font-size: 14px; color: var(--muted); }

.blognav { border-top: 1px solid var(--line); }
.blognav__list {
  display: flex; gap: 0 24px; margin: 0; padding: 0; list-style: none;
  overflow-x: auto; white-space: nowrap; scrollbar-width: none;
}
.blognav__list::-webkit-scrollbar { display: none; }
.blognav__list a {
  display: block; padding: 11px 0 10px; margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  color: var(--ink-2); font-size: 15px; text-decoration: none;
}
.blognav__list a:hover { color: var(--ink); }
.blognav__list a[aria-current="page"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }
.blognav__aux { margin-left: auto; }
.blognav__aux a, .blognav__aux2 a { color: var(--muted); font-size: 14px; }

@media (max-width: 599px) {
  .masthead__top { padding-top: 18px; padding-bottom: 12px; }
  .masthead__title { font-size: 22px; }
  .masthead__desc { font-size: 13px; }
  .blognav__list { gap: 0 18px; }
  .blognav__aux { margin-left: 6px; }
}

/* Layout */
.layout { padding-top: 32px; padding-bottom: 56px; }
.layout__main { display: block; min-width: 0; }
.layout__main:focus { outline: none; }
.sidebar { display: none; }
@media (min-width: 1024px) {
  .layout { display: grid; grid-template-columns: minmax(0, 1fr) var(--side); column-gap: 48px; align-items: start; }
  .sidebar { display: block; min-width: 0; }
}
@media (max-width: 599px) { .layout { padding-top: 20px; padding-bottom: 40px; } }

/* Sidebar */
.side-box { margin: 0 0 24px; padding: 0 0 20px; border-bottom: 1px solid var(--line); }
.side-box__title { margin: 0 0 8px; font-size: 14px; font-weight: 600; color: var(--ink); }
.side-profile p { margin: 0; }
.side-profile__name { font-size: 17px; font-weight: 700; letter-spacing: -.02em; }
.side-profile__desc { margin-top: 4px !important; font-size: 14px; line-height: 1.6; color: var(--muted); }
.side-profile__link { margin-top: 8px !important; font-size: 13px; }
.side-cats__list { margin: 0; padding: 0; list-style: none; }
.side-cats__list a { display: block; padding: 5px 0; color: var(--ink-2); font-size: 15px; }
.side-cats__list li + li a { padding-left: 10px; }
.side-cats__list a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.side-cats__count { color: var(--faint); font-size: 13px; }
.sidebar__ad .ad-preview { margin: 0; }

/* Shared heads */
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 8px; padding: 0; list-style: none; font-size: 13px; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: 4px; color: var(--faint); }
.crumbs a { color: var(--muted); }

.list-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding-bottom: 10px; border-bottom: 1px solid var(--ink);
}
.list-head__title { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.list-head__link { font-size: 13px; color: var(--muted); }

.page-head { padding-bottom: 14px; border-bottom: 1px solid var(--ink); }
.page-head__title { margin: 0; font-size: 26px; font-weight: 700; line-height: 1.35; letter-spacing: -.03em; }
.page-head__desc { margin: 6px 0 0; font-size: 15px; color: var(--muted); }

/* Post list */
.postlist { margin: 0; padding: 0; list-style: none; }
.post-item { border-bottom: 1px solid var(--line); }
.post-item__inner { display: flex; align-items: flex-start; gap: 20px; padding: 20px 0; }
.post-item__text { flex: 1; min-width: 0; }
.post-item__title { margin: 0 0 6px; font-size: 18px; font-weight: 600; line-height: 1.45; letter-spacing: -.02em; }
.post-item__title a { color: var(--ink); }
.post-item__excerpt {
  margin: 0 0 8px; font-size: 15px; line-height: 1.6; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.post-item__meta { display: flex; flex-wrap: wrap; gap: 0 6px; margin: 0; font-size: 13px; color: var(--faint); font-variant-numeric: tabular-nums; }
.post-item__meta a { color: var(--muted); }
.post-item__thumb { flex: none; display: block; width: 150px; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 4px; background: var(--soft); }
.post-item__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; }
.postlist__ad { padding: 4px 0 20px; border-bottom: 1px solid var(--line); }
.postlist__ad .ad-preview { margin: 16px auto 0; }
@media (max-width: 599px) {
  .post-item__inner { gap: 14px; padding: 16px 0; }
  .post-item__title { font-size: 16px; }
  .post-item__excerpt { font-size: 14px; }
  .post-item__thumb { width: 92px; }
}

.empty { padding: 28px 0; color: var(--muted); font-size: 15px; }
.empty p { margin: 0 0 6px; }
.empty__title { color: var(--ink); font-weight: 600; font-size: 16px; }

.pager { display: flex; justify-content: space-between; gap: 12px; padding-top: 24px; }
.pager__link { padding: 7px 14px; border: 1px solid var(--line-2); border-radius: 4px; color: var(--ink-2); font-size: 14px; }
.pager__link:hover { border-color: var(--ink); text-decoration: none; }
.pager__link--next { margin-left: auto; }

/* Article */
.post__head { padding-bottom: 18px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.post__title { margin: 0 0 10px; font-size: 30px; font-weight: 700; line-height: 1.38; letter-spacing: -.03em; }
.post__excerpt { margin: 0 0 10px; font-size: 16px; line-height: 1.65; color: var(--ink-2); }
.post__meta { display: flex; flex-wrap: wrap; gap: 0 6px; margin: 0; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.preview-note {
  display: inline-block; margin: 10px 0 0; padding: 2px 8px;
  border: 1px solid var(--line); border-radius: 4px; background: var(--soft);
  color: var(--muted); font-size: 12px; line-height: 1.6;
}
@media (max-width: 599px) {
  .post__title { font-size: 24px; }
  .post__excerpt { font-size: 15px; }
}

.toc { margin: 0 0 32px; border: 1px solid var(--line); border-radius: 6px; background: var(--soft-2); }
.toc__summary {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 16px; cursor: pointer; list-style: none;
  font-size: 15px; font-weight: 600;
}
.toc__summary::-webkit-details-marker { display: none; }
.toc__summary::after {
  content: ""; width: 7px; height: 7px;
  border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg) translateY(-2px);
}
.toc[open] .toc__summary::after { transform: rotate(-135deg) translateY(-2px); }
.toc__list { margin: 0; padding: 0 16px 12px 36px; font-size: 15px; line-height: 1.55; }
.toc__list li { padding: 3px 0; }
.toc__list li::marker { color: var(--faint); font-variant-numeric: tabular-nums; }
.toc__list a { color: var(--ink-2); }
.toc__list a:hover { color: var(--link); }

/* Article body (immutable HTML; overrides renderer inline styles) */
.blog-automation-article { font-size: 16px; line-height: 1.75; color: var(--ink); }
.blog-automation-article > :first-child { margin-top: 0 !important; }
.blog-automation-article > section { margin: 36px 0 0 !important; padding: 0 !important; }
.blog-automation-article > section:first-of-type { margin-top: 0 !important; }

.blog-automation-article h2 {
  margin: 0 0 14px !important;
  padding: 0 0 10px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--line-2) !important;
  background: none !important;
  color: var(--ink) !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  letter-spacing: -.02em;
  scroll-margin-top: 16px;
}
.blog-automation-article h3 {
  margin: 22px 0 6px !important; padding: 0 !important; border: 0 !important; background: none !important;
  color: var(--ink) !important; font-size: 17px !important; font-weight: 600 !important; line-height: 1.5;
  scroll-margin-top: 16px;
}
.blog-automation-article p { margin: 0 0 12px; }
.blog-automation-article ul,
.blog-automation-article ol { margin: 0 0 14px; padding-left: 22px; }
.blog-automation-article li { margin: 4px 0; }
.blog-automation-article li::marker { color: var(--faint); }
.blog-automation-article a { color: var(--link) !important; overflow-wrap: anywhere; }
.blog-automation-article strong { font-weight: 700 !important; }
.blog-automation-article hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
.blog-automation-article blockquote { margin: 16px 0; padding: 10px 14px; border-left: 2px solid var(--line-2) !important; background: var(--soft) !important; color: var(--ink-2); }
.blog-automation-article code { padding: 0 .3em; border-radius: 3px; background: var(--soft); }

/* Summary: noun bullets + one artwork */
.blog-automation-article > section:first-of-type > ul {
  margin: 0 !important; padding: 14px 18px 14px 36px !important;
  border-radius: 6px; background: var(--soft);
}
.blog-automation-article > section:first-of-type > ul li { margin: 3px 0; font-weight: 500; }
.blog-automation-article > section:first-of-type > figure { margin: 16px 0 0 !important; }
.blog-automation-article > section:first-of-type > figure img {
  width: auto !important; max-width: 100% !important; height: auto !important; max-height: 220px !important;
  object-fit: contain; margin: 0 auto !important;
}
@media (min-width: 640px) {
  .blog-automation-article > section:first-of-type:has(> figure) {
    display: grid; grid-template-columns: minmax(0, 1fr) 260px; column-gap: 20px; align-items: start;
  }
  .blog-automation-article > section:first-of-type:has(> figure) > * { grid-column: 1; min-width: 0; }
  .blog-automation-article > section:first-of-type:has(> figure) > h2 { grid-column: 1 / -1; }
  .blog-automation-article > section:first-of-type:has(> figure) > figure { grid-column: 2; grid-row: 2 / span 4; margin: 0 !important; }
  .blog-automation-article > section:first-of-type > figure img { width: 100% !important; max-height: 300px !important; }
}

/* Figures */
.blog-automation-article figure { margin: 20px 0 !important; padding: 0 !important; border: 0 !important; background: none !important; }
.blog-automation-article img {
  display: block; max-width: 100% !important; height: auto !important;
  margin: 0 auto !important; border-radius: 6px !important; background: var(--soft);
}
.blog-automation-article figure img { max-height: 440px; object-fit: contain; }
.blog-automation-article figure[data-visual-kind="screenshot"] img { max-height: none; }

/* Screenshot enlarge button + viewer */
.shot-tools { display: flex; justify-content: flex-end; margin: 6px 0 0; }
.shot-btn {
  display: inline-flex; align-items: center; flex: none; min-height: 32px; padding: 4px 12px;
  border: 1px solid var(--line-2); border-radius: 4px; background: #fff;
  color: var(--ink-2); font-size: 13px; font-weight: 500; line-height: 1.4; white-space: nowrap; cursor: pointer;
}
.shot-btn:hover { border-color: var(--ink); color: var(--ink); }
.shot-btn[aria-pressed="true"] { border-color: var(--ink); background: var(--soft); color: var(--ink); font-weight: 600; }

.shot-viewer {
  width: calc(100% - 16px); max-width: 1100px;
  height: calc(100% - 16px); max-height: none;
  margin: auto; padding: 0; overflow: hidden;
  border: 1px solid var(--line-2); border-radius: 8px;
  background: var(--bg); color: var(--ink);
}
.shot-viewer[open] { display: flex; flex-direction: column; }
.shot-viewer::backdrop { background: rgba(0, 0, 0, .6); }
.shot-viewer__bar {
  display: flex; align-items: center; gap: 6px; flex: none;
  padding: 8px 10px; border-bottom: 1px solid var(--line);
}
.shot-viewer__title {
  flex: 1; min-width: 0; margin: 0; font-size: 15px; font-weight: 600; line-height: 1.4;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.shot-viewer__scroll {
  flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch; background: var(--soft);
}
.shot-viewer__scroll:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.shot-viewer__scroll img { display: block; width: 100%; max-width: 100%; height: auto; margin: 0 auto; }
.shot-viewer.is-natural .shot-viewer__scroll img { width: auto; max-width: none; margin: 0; }
.shot-viewer__caption {
  flex: none; max-height: 25%; overflow: auto; margin: 0; padding: 8px 12px;
  border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; line-height: 1.55;
}
.blog-automation-article figcaption {
  margin: 6px 0 0 !important; padding: 0 !important;
  color: var(--muted) !important; font-size: 13px !important; line-height: 1.55 !important;
}

/* Tables */
.blog-automation-article [role="region"] {
  max-width: 100%; margin: 18px 0 !important; padding: 0 !important;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  border: 0 !important; background: none !important; box-shadow: none !important;
}
.blog-automation-article [role="region"]:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.blog-automation-article table {
  width: 100% !important; min-width: 0 !important; margin: 0;
  border-collapse: collapse !important; border: 0 !important; background: none !important;
  font-size: 16px !important; line-height: 1.55; font-variant-numeric: tabular-nums;
}
.blog-automation-article caption {
  caption-side: top; padding: 0 0 8px !important; text-align: left !important;
  font-size: 14px; font-weight: 600 !important; color: var(--ink-2);
}
.blog-automation-article th,
.blog-automation-article td {
  padding: 10px 12px !important;
  border: 1px solid var(--line) !important;
  background: #fff !important;
  color: var(--ink) !important;
  text-align: left !important;
  vertical-align: middle;
  font-weight: 400 !important;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.blog-automation-article thead th { background: var(--soft) !important; font-size: 15px; font-weight: 600 !important; }
.blog-automation-article tbody th { background: var(--soft-2) !important; font-weight: 600 !important; }

/* Two-column tables (combo / cycle rows): label column + wrapping arrow sequence */
.blog-automation-article table:not(:has(img)):not(:has(th:nth-child(3), td:nth-child(3))) tbody th { width: 30%; }
.blog-automation-article table:not(:has(img)):not(:has(th:nth-child(3), td:nth-child(3))) td { line-height: 1.65; }

/* Character portrait table: equal cells, faces visible */
.blog-automation-article table:has(img) { table-layout: fixed; }
.blog-automation-article table:has(img) th,
.blog-automation-article table:has(img) td {
  padding: 10px 6px !important; text-align: center !important; vertical-align: top;
  font-size: 15px; font-weight: 500 !important;
}
.blog-automation-article table:has(img) thead th { font-weight: 600 !important; }
.blog-automation-article table:has(img) tbody th:has(img) { background: #fff !important; }
.blog-automation-article table:has(img) img {
  width: 100% !important; max-width: 120px !important;
  height: 136px !important; max-height: none !important;
  object-fit: cover !important; object-position: 50% 15%;
  margin: 0 auto 6px !important;
}

@media (max-width: 599px) {
  .blog-automation-article table { font-size: 15px !important; }
  .blog-automation-article th,
  .blog-automation-article td { padding: 8px !important; }
  .blog-automation-article thead th { font-size: 14px; }
  .blog-automation-article table:has(img) th,
  .blog-automation-article table:has(img) td { padding: 8px 4px !important; font-size: 13px; }
  .blog-automation-article table:has(img) img { height: 112px !important; }
}

/* Sources + freshness */
.blog-automation-article > section:last-of-type ul { font-size: 14px; }
.blog-automation-article .blog-freshness {
  margin: 32px 0 0 !important; padding: 12px 14px !important;
  border: 0 !important; border-radius: 6px !important; background: var(--soft) !important;
  color: var(--muted) !important; font-size: 14px; line-height: 1.6;
}

/* Live ad unit (only when ads.enabled) */
.ad { width: 100%; max-width: 100%; margin: 28px 0; overflow: hidden; }
.ad__label { margin: 0 0 4px; font-size: 11px; line-height: 1.4; color: var(--faint); }
.ad ins.adsbygoogle { display: block; width: 100%; max-width: 100%; min-height: 100px; }
.ad ins.adsbygoogle[data-ad-status="unfilled"] { display: none !important; }
.ad.is-unfilled, .ad:has(ins.adsbygoogle[data-ad-status="unfilled"]) { display: none; }
@media (min-width: 768px) { .ad ins.adsbygoogle { min-height: 120px; } }

/* Ad placement preview: plain placeholder, no ad code */
.ad-preview {
  display: block; width: 100%; max-width: var(--ad-mw, 100%);
  margin: 28px auto; color: var(--muted); font-size: 13px; line-height: 1.5;
}
.ad-preview__label { display: block; margin: 0 0 4px; font-size: 11px; color: var(--faint); }
.ad-preview__box {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: var(--ad-mh, 100px); padding: 8px 12px;
  border: 1px solid var(--line); border-radius: 4px; background: var(--soft);
  text-align: center; cursor: default; user-select: none;
}
.ad-preview__title { color: var(--ink-2); font-weight: 500; }
.ad-preview__size { font-weight: 600; font-variant-numeric: tabular-nums; }
.ad-preview__size--desktop { display: none; }
.ad-preview__context { font-size: 12px; color: var(--faint); }
@media (min-width: 768px) {
  .ad-preview { max-width: var(--ad-w, 100%); }
  .ad-preview__box { min-height: var(--ad-h, 90px); }
  .ad-preview__size--desktop { display: inline; }
  .ad-preview__size--mobile { display: none; }
}

/* Related */
.related { margin-top: 40px; padding-top: 10px; border-top: 1px solid var(--ink); }
.related__title { margin: 0 0 4px; font-size: 16px; font-weight: 600; }
.related__list { margin: 0; padding: 0; list-style: none; }
.related__list li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 15px;
}
.related__list a { color: var(--ink-2); min-width: 0; }
.related__list time { flex: none; color: var(--faint); font-size: 13px; font-variant-numeric: tabular-nums; }

/* Static pages */
.static-page { max-width: 720px; }
.static-page__title { margin: 0 0 18px; padding-bottom: 12px; border-bottom: 1px solid var(--ink); font-size: 26px; font-weight: 700; line-height: 1.35; letter-spacing: -.03em; }
.static-page__body p { margin: 0 0 14px; line-height: 1.8; }
.static-page__links { margin: 0 0 14px; padding-left: 20px; line-height: 1.8; }
.static-page__links li { margin: 2px 0; }
.static-page__links a { overflow-wrap: anywhere; }
.static-page__back { margin: 24px 0 0; font-size: 15px; }

/* Footer */
.site-footer { padding: 24px 0 28px; border-top: 1px solid var(--line); background: var(--soft); color: var(--muted); font-size: 13px; }
.site-footer p { margin: 0 0 4px; line-height: 1.6; }
.site-footer strong { color: var(--ink); font-weight: 600; }
.site-footer__nav ul { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0 0 12px; padding: 0; list-style: none; }
.site-footer__nav a { color: var(--ink-2); }
.site-footer__legal { margin-top: 10px !important; color: var(--faint); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

@media print {
  .blognav, .sidebar, .site-footer, .toc-wrap, .ad, .ad-preview, .preview-note, .related, .skip-link, .shot-tools { display: none !important; }
  .layout { display: block; }
}
