/* shortcut: 글꼴을 외부에서 불러온다. 외부 연결을 끊고 싶으면 static/에 글꼴 파일을 둔다. */

/* ---------- 토큰 ---------- */
:root {
  --accent: #f06a1a;
  --accent-soft: #fff3ea;
  --ink: #222;
  --muted: #777;
  --line: #f0f0f0;
  --bg-soft: #f7f7f8;
  --radius: 10px;
  --container: 1200px;
  /* 흰 바탕 위 본문 크기 글자용: --accent·--muted는 4.5:1에 못 미친다 */
  --accent-ink: #b84a0a;
  --muted-ink: #666;
  --line-strong: #e4e4e7;
  --shadow: 0 12px 21px rgba(0, 0, 0, .04);
  --shadow-hover: 0 14px 24px rgba(0, 0, 0, .08);
  --sticky-top: 0px; /* 휴대폰에서는 붙어 있는 머리말 높이 */
}

/* ---------- 기본 ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--sticky-top); scroll-padding-bottom: 64px; /* 아래 바(56px)에 가리지 않게 */ }
body { display: flex; flex-direction: column; min-height: 100vh; margin: 0; color: var(--ink); background: #fff; font-family: "Pretendard Variable", Pretendard, system-ui, sans-serif; line-height: 1.6; overflow-wrap: break-word; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: 2px; }
.tabs :focus-visible, .site-nav-row :focus-visible { outline-offset: -3px; } /* 가로로 밀리는 줄 안에서 테두리가 잘리지 않게 */
h1, h2, h3 { line-height: 1.3; margin: 0 0 .5em; }
img { max-width: 100%; height: auto; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 16px; }
main.container { flex: 1; width: 100%; }
.muted { color: var(--muted-ink); font-size: .9em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
section { margin-bottom: 32px; }
.page-title { font-size: 1.75rem; font-weight: 800; margin: 32px 0 20px; }
.section-title { font-size: 1.75rem; font-weight: 800; margin: 56px 0 20px; }
.not-found { text-align: center; padding: 64px 0; }

.preview-band { background: var(--accent-ink); color: #fff; text-align: center; padding: 6px 16px; font-weight: 600; }
.badge-draft { display: inline-block; background: var(--accent-soft); color: var(--accent-ink); border-radius: 4px; padding: 0 6px; font-size: .75rem; font-weight: 700; vertical-align: middle; }

/* ---------- 머리말 ---------- */
.site-header { background: #fff; border-bottom: 1px solid var(--line-strong); z-index: 20; }
.header-row { display: flex; align-items: center; gap: 16px; height: 76px; }
.logo { flex: none; display: inline-flex; align-items: baseline; font-size: 28px; font-weight: 800; letter-spacing: -.04em; line-height: 1; color: var(--ink); }
.logo:hover { color: var(--ink); }
.logo-dot { width: .22em; height: .22em; margin-left: .06em; border-radius: 50%; background: var(--accent); }
.logo-small { font-size: 20px; }
.search { position: relative; flex: 0 1 520px; margin-left: 32px; }
.search input { width: 100%; height: 46px; border: 2px solid var(--accent); border-radius: 999px; padding: 0 52px 0 20px; font: inherit; font-size: 1rem; background: #fff; color: var(--ink); }
.search input::placeholder { color: var(--muted-ink); }
.search input::-webkit-search-cancel-button { display: none; }
.search-btn { position: absolute; top: 5px; right: 5px; width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--accent); color: #fff; cursor: pointer; }
.search-btn:hover { background: var(--accent-ink); }
#tool-select { height: 46px; border: 1px solid var(--line-strong); border-radius: 999px; padding: 0 16px; font: inherit; font-size: .95rem; color: var(--ink); background: #fff; cursor: pointer; max-width: 200px; }
.site-nav { border-top: 1px solid var(--line); }
.site-nav-row { display: flex; gap: 36px; }
.site-nav a { display: flex; align-items: center; height: 52px; font-size: 17px; font-weight: 700; white-space: nowrap; }
.site-nav .count { position: relative; top: -.75em; margin-left: 3px; padding: 0 6px; border-radius: 999px; background: var(--accent-ink); color: #fff; font-size: 11px; font-weight: 700; line-height: 17px; }

/* ---------- 꼬리말 ---------- */
.site-footer { margin-top: 72px; padding: 28px 0 36px; background: var(--bg-soft); border-top: 1px solid var(--line-strong); color: var(--muted-ink); font-size: .875rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.footer-links a { display: inline-flex; align-items: center; min-height: 32px; color: var(--ink); font-weight: 600; }
.footer-brand { display: flex; align-items: center; gap: 12px; margin: 16px 0 0; }

/* ---------- 첫 화면 ---------- */
.hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 28px 0 24px; padding: 44px 48px; border-radius: var(--radius); background: linear-gradient(110deg, #c04d0b 0%, #b8480a 60%, #9e3c06 100%); /* 흰 글자 4.5:1 이상 */ color: #fff; }
.hero h1 { margin: 0 0 8px; font-size: 2.25rem; font-weight: 800; letter-spacing: -.02em; }
.hero p { margin: 0; font-weight: 600; }
.hero-stats { display: flex; gap: 40px; flex: none; }
.hero-stats span { display: flex; flex-direction: column; align-items: flex-end; font-weight: 700; font-size: 1rem; }
.hero-stats b { font-size: 3.25rem; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }

.boxes .box { padding: 20px 24px; }
.box-head { display: flex; align-items: center; margin: 0 0 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); font-size: 1.125rem; font-weight: 800; }
.news-list, .shortcuts { margin: 0; padding: 0; list-style: none; }
.news-list li { display: flex; align-items: center; gap: 12px; min-height: 36px; }
.news-list a { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.news-list .date { flex: none; margin-left: auto; color: var(--muted-ink); font-size: .85rem; }
.pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 4px 0 0; }
.pill { display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px; border: 1px solid var(--accent); border-radius: 999px; color: var(--accent-ink); font-size: .9rem; font-weight: 600; }
.pill:hover { background: var(--accent-soft); }
.shortcuts { columns: 2; column-gap: 16px; }
.shortcuts li { break-inside: avoid; }
.shortcuts a { display: flex; align-items: center; min-height: 36px; font-weight: 600; }
.shortcuts a::before { content: "›"; margin-right: 6px; color: var(--accent-ink); }

.more { margin: 24px 0 0; text-align: center; }
.more-btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 28px; border: 1px solid var(--accent); border-radius: 999px; color: var(--accent-ink); font-weight: 700; }
.more-btn:hover { background: var(--accent-soft); }

/* ---------- 카드와 격자 ---------- */
.grid-3, .grid-4, .grid-5 { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.empty { grid-column: 1 / -1; margin: 0; padding: 32px; border: 2px dashed var(--line-strong); border-radius: var(--radius); text-align: center; }

.card { display: flex; flex-direction: column; min-width: 0; border: 2px solid var(--line); border-radius: var(--radius); padding: 16px; background: #fff; box-shadow: var(--shadow); transition: box-shadow .15s, transform .15s; }
a.card:hover { color: inherit; box-shadow: var(--shadow-hover); transform: translateY(-2px); }
a.card:hover .card-title { color: var(--accent-ink); }
.card-meta { color: var(--muted-ink); font-size: .8rem; font-weight: 600; }
.card-title { margin: 2px 0 0; font-size: 1.05rem; font-weight: 800; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.card-summary { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; margin: 0; color: var(--muted-ink); font-size: .9rem; }

.tool-card { padding: 0; overflow: hidden; }
.thumb { display: grid; place-items: center; aspect-ratio: 16 / 10; background: linear-gradient(135deg, var(--accent-soft), #ffe2cc); }
.thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.thumb-letter { color: var(--accent-ink); font-size: 2.75rem; font-weight: 800; }
.tool-card .card-meta { margin: 14px 16px 0; }
.tool-card .card-title { margin: 2px 16px 0; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.tool-card .card-summary { margin: 10px 16px 16px; }
.card-foot { margin: auto 16px 14px; color: var(--accent-ink); font-size: .85rem; font-weight: 700; }

.pick-card { gap: 6px; padding: 14px; }
.pick-card img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; margin-bottom: 4px; }
.pick-card .card-title { font-size: 1rem; color: var(--accent-ink); }
.pick-card .card-meta { margin-top: auto; padding-top: 6px; }

/* ---------- 가로 줄 (활용 글, 검색 결과) ---------- */
.rows { display: flex; flex-direction: column; gap: 12px; }
.post-row { display: flex; align-items: center; gap: 16px; min-height: 72px; padding: 14px 20px; border: 2px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.post-row:hover { color: inherit; box-shadow: var(--shadow-hover); }
.post-row:hover strong { color: var(--accent-ink); }
.post-row > img { flex: none; width: 112px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; }
.post-row-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.post-row-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.post-row-title strong { font-size: 1.05rem; }
.row-tag { color: var(--accent-ink); font-size: .85rem; font-weight: 600; }
.post-row-summary { color: var(--muted-ink); font-size: .9rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.post-row-date { flex: none; margin-left: auto; color: var(--muted-ink); font-size: .85rem; }
.kind { flex: none; padding: 2px 10px; border: 1px solid var(--accent); border-radius: 999px; color: var(--accent-ink); font-size: .8rem; font-weight: 700; white-space: nowrap; }


/* ---------- 새 소식 표 ---------- */
.news-table { width: 100%; border-collapse: collapse; border-top: 2px solid var(--accent); }
.news-table th, .news-table td { padding: 14px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.news-table th { background: var(--bg-soft); font-size: .9rem; }
.news-table .num { width: 72px; text-align: center; color: var(--muted-ink); }
.news-table .date { width: 120px; color: var(--muted-ink); white-space: nowrap; }
.news-table tbody tr:hover { background: var(--accent-soft); }

/* ---------- 글 쪽 ---------- */
.article { max-width: 820px; margin: 32px auto; }
.article-wide { max-width: none; }
.article-head { margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--line-strong); }
.article-head h1 { font-size: 2rem; font-weight: 800; letter-spacing: -.01em; }
.article-head p { margin: 6px 0 0; }
.article-lead { font-size: 1.1rem; color: #444; }
.article-head .article-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.tag { display: inline-block; background: var(--accent-soft); color: var(--accent-ink); border-radius: 4px; padding: 1px 8px; font-size: .85rem; font-weight: 600; }

.tabs { position: sticky; top: var(--sticky-top); z-index: 10; display: flex; margin: 0 0 28px; border-top: 2px solid var(--ink); background: #fff; }
.tabs a { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 12px; background: var(--bg-soft); border: 1px solid var(--line-strong); border-top: 0; font-weight: 700; white-space: nowrap; }
.tabs a + a { border-left: 0; }
.tabs a:hover, .tabs a:focus-visible { background: #fff; color: var(--accent-ink); }

.article-layout:has(> .toc) { display: grid; grid-template-columns: minmax(0, 1fr) 248px; gap: 48px; align-items: start; }
.article-layout > .toc { grid-column: 2; grid-row: 1; }
.article-main { min-width: 0; max-width: 860px; }
.article-layout:not(:has(> .toc)) .article-main { margin: 0 auto; }

.toc { position: sticky; top: calc(var(--sticky-top) + 72px); padding: 16px 18px; border: 2px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); font-size: .9rem; }
.toc summary { font-weight: 800; cursor: pointer; }
.toc ul { margin: 8px 0 0; padding: 0; list-style: none; }
.toc li a { display: block; padding: 4px 0; color: #444; }
.toc li a:hover { color: var(--accent-ink); }
.toc .toc-3 { padding-left: 14px; font-size: .85rem; }
@supports selector(::details-content) {
  /* 넓은 화면에서는 목차를 늘 펼쳐 둔다; 이 선택자를 모르는 브라우저는 접힌 채로 둔다 */
  @media (min-width: 1025px) {
    .toc summary { pointer-events: none; list-style: none; }
    .toc summary::-webkit-details-marker { display: none; }
    .toc details::details-content { content-visibility: visible; display: block; }
  }
}

.lead-img { display: block; width: 100%; aspect-ratio: 21 / 9; object-fit: cover; border-radius: var(--radius); margin-bottom: 24px; }
.video { position: relative; aspect-ratio: 16 / 9; margin: 0 0 24px; border-radius: var(--radius); background: #1f2329; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: var(--radius); }

/* 본문 */
.body { font-size: 17px; line-height: 1.75; }
.body h2 { margin: 2.2em 0 .7em; padding-top: .3em; font-size: 1.5rem; font-weight: 800; }
.body h3 { margin: 1.8em 0 .5em; font-size: 1.2rem; font-weight: 800; }
.body h2, .body h3, #others { scroll-margin-top: calc(var(--sticky-top) + 64px); }
.body > :first-child { margin-top: 0; }
.body p, .body ul, .body ol { margin: 0 0 1.1em; }
.body li + li { margin-top: .3em; }
.body a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
.body img { border-radius: 6px; }
.body blockquote { margin: 1.5em 0; padding: 14px 20px; border-left: 4px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0; background: var(--accent-soft); color: #333; }
.body blockquote > :last-child { margin-bottom: 0; }
.table-wrap { margin: 1.5em 0; overflow-x: auto; border: 1px solid var(--line-strong); border-radius: var(--radius); }
.body table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.body th, .body td { padding: 10px 14px; border-bottom: 1px solid var(--line-strong); text-align: left; white-space: nowrap; }
.body th { background: var(--bg-soft); font-weight: 700; }
.body tr:last-child td { border-bottom: 0; }
.body :not(pre) > code { padding: 1px 6px; border-radius: 4px; background: var(--bg-soft); font-size: .9em; }
.code { position: relative; margin: 1.5em 0; }
.code pre { margin: 0; padding: 18px 20px; padding-right: 88px; overflow-x: auto; border-radius: var(--radius); background: #1f2329; color: #e8eaed; font-size: .9rem; line-height: 1.6; }
.copy { position: absolute; top: 10px; right: 10px; min-height: 30px; padding: 0 12px; border: 1px solid #4a505a; border-radius: 6px; background: #2c3139; color: #e8eaed; font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; }
.copy:hover { background: #3a404a; }
.body details { margin: 1.5em 0; padding: 0 18px; border: 2px solid var(--line-strong); border-radius: var(--radius); }
.body details[open] { padding-bottom: 14px; }
.body summary { padding: 12px 0; font-weight: 700; cursor: pointer; }

.note { margin: 32px 0; padding: 18px 22px; border-radius: var(--radius); background: var(--accent-soft); border: 1px solid #ffd9bf; }
.note strong { color: var(--accent-ink); }
.note p { margin: 6px 0 0; }
#others { margin-top: 48px; }
#others h2, .sources h2 { font-size: 1.35rem; font-weight: 800; }
.sources { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line-strong); }
.sources ul { margin: 0; padding-left: 20px; }
.sources li { padding: 4px 0; }
.sources a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }

/* ---------- 1024px 이하 ---------- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .article-layout:has(> .toc) { display: block; }
  .toc { position: static; margin-bottom: 24px; box-shadow: none; }
  .toc ul { padding-bottom: 4px; }
}

/* ---------- 640px 이하 (휴대폰) ---------- */
@media (max-width: 640px) {
  :root { --sticky-top: 102px; }
  .site-header { position: sticky; top: 0; }
  .header-row { gap: 8px; height: 56px; }
  .header-row .logo { font-size: 22px; }
  .search { flex: 1; min-width: 0; margin-left: 0; }
  .search input { height: 40px; padding: 0 44px 0 14px; font-size: 16px; }
  .search-btn { top: 0; right: 0; width: 40px; height: 40px; }
  #tool-select { flex: none; width: 104px; height: 40px; padding: 0 10px; font-size: 16px; }
  .site-nav-row { gap: 24px; overflow-x: auto; scrollbar-width: none; }
  .site-nav-row::-webkit-scrollbar { display: none; }
  .site-nav a { height: 44px; font-size: 16px; }

  .grid-3, .grid-4, .grid-5 { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .hero { flex-direction: column; align-items: flex-start; padding: 28px 22px; margin-top: 16px; }
  .hero h1 { font-size: 1.6rem; }
  .hero-stats { gap: 28px; }
  .hero-stats span { align-items: flex-start; }
  .hero-stats b { font-size: 2.4rem; }
  .boxes .box { padding: 16px 18px; }
  .news-list li, .shortcuts a { min-height: 40px; }
  .news-list a { padding: 9px 0; line-height: 22px; }
  .toc summary { padding: 9px 0; line-height: 22px; }
  .pill { min-height: 40px; }
  .section-title { font-size: 1.4rem; margin-top: 40px; }
  /* 휴대폰 카드는 그림을 왼쪽에 작게 둔 가로형 */
  .tool-card { display: grid; grid-template-columns: 104px minmax(0, 1fr); grid-template-rows: auto auto auto 1fr; }
  .tool-card .thumb { grid-row: 1 / -1; aspect-ratio: auto; min-height: 112px; }
  .tool-card > :not(.thumb) { grid-column: 2; }
  .tool-card .card-meta { margin-top: 12px; }
  .tool-card .card-title { padding-bottom: 6px; }
  .tool-card .card-summary { margin: 6px 16px 12px; }
  .card-foot { margin-top: 0; }
  .thumb-letter { font-size: 2rem; }
  .pick-card:has(> img) { display: grid; grid-template-columns: 88px minmax(0, 1fr); align-content: start; gap: 4px 14px; }
  .pick-card > img { grid-row: 1 / span 3; aspect-ratio: 1; margin: 0; }
  .pick-card:has(> img) > :not(img) { grid-column: 2; }
  .pick-card .card-meta { padding-top: 2px; }
  .page-title { font-size: 1.5rem; margin-top: 24px; }

  .post-row { align-items: flex-start; flex-wrap: wrap; gap: 10px 12px; padding: 14px 16px; }
  .post-row > img { width: 88px; }
  .post-row-summary { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .post-row-date { flex-basis: 100%; margin-left: 0; font-size: .8rem; }
  .post-row > img ~ .post-row-date { padding-left: 100px; }

  .news-table .num { display: none; }
  .news-table .date { width: auto; }
  .news-table th, .news-table td { padding: 12px 8px; }

  .article { margin-top: 20px; }
  .article-head h1 { font-size: 1.6rem; }
  .tabs { overflow-x: auto; scrollbar-width: none; }
  .tabs a { flex: 1 0 auto; min-height: 44px; font-size: .9rem; }
  .body { font-size: 16px; }
  .body h2 { font-size: 1.3rem; }
  .code pre { padding-right: 20px; padding-top: 48px; }
  .copy { min-height: 36px; }
  .footer-links a { min-height: 40px; }
  .toc li a { padding: 8px 0; }
}
.body th.ta-left, .body td.ta-left { text-align: left; }
.body th.ta-center, .body td.ta-center { text-align: center; }
.body th.ta-right, .body td.ta-right { text-align: right; }

/* ================= 변형 B: 움직임과 틀 ================= */
:root {
  --sticky-top: 130px;
  --lift: 0 16px 44px rgba(0, 0, 0, .12);
  --ease: .16s ease;
  --tint-a: #fff7f1;
  --tint-b: #f4f5f7;
}
body { padding-bottom: 56px; }

/* 위 막대: 반투명, 뒤가 흐리게 비친다 */
.site-header { position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, .93); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); }
.site-nav { border-top-color: rgba(0, 0, 0, .05); }
.menu-btn { display: none; flex: none; width: 40px; height: 40px; place-items: center; margin-left: auto; border: 1px solid var(--line-strong); border-radius: 50%; background: #fff; color: var(--ink); cursor: pointer; }

/* 같은 손맛: 떠오름과 그림자 */
.card, .post-row, .post-card, .marquee-card, .pill, .more-btn, .btn, .chip-btn, .dock-cta, .search-btn, .menu-btn, .icon-btn { transition: transform var(--ease), box-shadow var(--ease), background-color var(--ease), color var(--ease), border-color var(--ease); }
a.card:hover, .post-row:hover, .post-card:hover, .marquee-card:hover { transform: translateY(-3px); box-shadow: var(--lift); }
.pill:hover, .more-btn:hover, .btn:hover, .chip-btn:hover, .dock-cta:hover, .menu-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0, 0, 0, .1); }
.post-row:hover { transform: translateY(-3px); }

/* 단추 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 18px; border: 1px solid var(--line-strong); border-radius: 999px; background: #fff; color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.btn-accent { border-color: var(--accent-ink); background: var(--accent-ink); color: #fff; }
.btn-accent:hover { background: #9e3c06; }
.link-btn { border: 0; padding: 4px 6px; background: none; color: var(--accent-ink); font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--bg-soft); color: var(--ink); cursor: pointer; }

/* 아래 막대 */
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: 56px; background: #17181b; color: #fff; box-shadow: 0 -6px 20px rgba(0, 0, 0, .12); }
.dock-row { display: flex; align-items: center; gap: 6px; height: 100%; }
.dock-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: #d8dade; }
.dock-icon:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.dock-cta { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; min-height: 40px; padding: 0 18px; border-radius: 999px; background: var(--accent); color: #17181b; font-weight: 800; }
.dock-cta:hover { color: #17181b; background: #ff7f33; }
.dock :focus-visible { outline-color: #ffb27f; }

/* 옆에서 나오는 메뉴, 아래에서 오르는 판, 어두운 막 */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 60; width: min(320px, 86vw); padding: 14px 20px 24px; overflow-y: auto; background: #fff; box-shadow: -12px 0 40px rgba(0, 0, 0, .15); transform: translateX(100%); visibility: hidden; transition: transform .26s cubic-bezier(.2, .8, .2, 1), visibility 0s .26s; }
.drawer.is-open, .sheet.is-open { transform: none; visibility: visible; transition-delay: 0s; } /* 열 때는 바로 보여야 초점이 들어간다 */
.drawer-head, .sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.drawer-title { font-size: 1.1rem; font-weight: 800; }
.drawer-nav { display: flex; flex-direction: column; }
.drawer-nav a { display: flex; align-items: center; gap: 6px; min-height: 48px; border-bottom: 1px solid var(--line); font-size: 1.05rem; font-weight: 700; }
.drawer-nav .count { padding: 0 7px; border-radius: 999px; background: var(--accent-ink); color: #fff; font-size: 11px; line-height: 18px; }
.drawer-sub { margin: 20px 0 0; color: var(--muted-ink); font-size: .85rem; font-weight: 700; }
.drawer-tools a { font-weight: 600; }
.backdrop { position: fixed; inset: 0; z-index: 55; background: rgba(15, 16, 18, .45); opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s; }
.backdrop.is-open { opacity: 1; visibility: visible; }
body.no-scroll { overflow: hidden; }

/* ---------- 첫 화면: 형광펜, 흐르는 띠 ---------- */
.hl { padding: 0 .15em; background: linear-gradient(transparent 58%, rgba(255, 216, 102, .75) 58%, rgba(255, 216, 102, .75) 92%, transparent 92%); color: inherit; }
.marquee { overflow: hidden; margin: 0 0 28px; padding: 8px 0 14px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); }
.marquee-track { display: flex; gap: 16px; width: max-content; animation: marquee 38s linear infinite; }
.marquee:hover .marquee-track, .marquee:focus-within .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(calc(-50% - 8px)); } }
.marquee-card { display: flex; align-items: center; gap: 12px; width: 260px; padding: 10px; border: 1px solid var(--line-strong); border-radius: 20px; background: #fff; }
.marquee-card:nth-child(even) { background: var(--tint-a); }
.marquee-card:hover { color: inherit; }
.marquee-card .thumb { flex: none; width: 64px; height: 64px; aspect-ratio: 1; border-radius: 14px; overflow: hidden; }
.marquee-card .thumb-letter { font-size: 1.6rem; }
.marquee-text { display: flex; flex-direction: column; min-width: 0; }
.marquee-text strong { font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 활용 글 목록 ---------- */
.posts-page { position: relative; padding-top: 18px; }
.sticker { display: inline-block; margin: 18px 0 -4px 4px; padding: 6px 14px; border: 2px solid var(--ink); border-radius: 10px; background: #ffd866; color: var(--ink); font-size: .85rem; font-weight: 800; box-shadow: 3px 3px 0 var(--ink); transform: rotate(-4deg); }
.posts-page .page-title { margin-top: 14px; font-size: 2.25rem; letter-spacing: -.02em; }
.finder-bar { display: flex; gap: 10px; }
.finder-field { position: relative; flex: 1; display: flex; align-items: center; }
.finder-field svg { position: absolute; left: 20px; color: var(--muted-ink); pointer-events: none; }
.finder-field input { width: 100%; height: 58px; padding: 0 22px 0 52px; border: 2px solid var(--line-strong); border-radius: 999px; background: #fff; color: var(--ink); font: inherit; font-size: 1.05rem; transition: border-color var(--ease), box-shadow var(--ease); }
.finder-field input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(240, 106, 26, .15); outline: none; }
.filter-btn { display: none; }
.sheet { margin-top: 18px; }
.sheet-head, .sheet-foot { display: none; }
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.filter-label { width: 44px; flex: none; color: var(--muted-ink); font-size: .85rem; font-weight: 800; }
.chip-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 999px; background: #fff; color: var(--ink); font: inherit; font-size: .92rem; font-weight: 700; cursor: pointer; }
.chip-btn .n { color: var(--muted-ink); font-size: .8rem; font-weight: 700; }
.chip-btn[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: #fff; }
.chip-btn[aria-pressed="true"] .n { color: #fff; }
.finder-meta { display: flex; align-items: center; gap: 10px; margin: 8px 0 18px; }
.finder-count { font-weight: 800; }
.post-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.post-card { display: flex; flex-direction: column; gap: 10px; min-height: 250px; padding: 24px 26px 22px; border-radius: 20px; background: var(--tint-a); }
.post-card.alt2 { background: var(--tint-b); }
.post-card[hidden] { display: none; }
.post-card:hover { color: inherit; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.chip { display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; }
.chip-tool { border: 1.5px solid var(--ink); color: var(--ink); }
.chip-tag { background: rgba(240, 106, 26, .13); color: var(--accent-ink); }
.post-card-title { margin: 4px 0 0; font-size: 1.4rem; font-weight: 900; letter-spacing: -.02em; line-height: 1.32; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.post-card-summary { margin: 0; color: #555; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; }
.post-card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 8px; }
.arrow { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--accent); color: #fff; transition: transform var(--ease); }
.post-card:hover .arrow { transform: translateX(4px); }
.finder-empty { margin: 8px 0 0; padding: 48px 16px; border: 2px dashed var(--line-strong); border-radius: 20px; text-align: center; color: var(--muted-ink); font-weight: 700; }

/* ---------- 글 쪽 ---------- */
.post-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 56px; align-items: start; margin: 36px 0; }
.post-layout:not(:has(> .steps)) { display: block; }
.post-main { min-width: 0; max-width: 740px; }
.post-layout:not(:has(> .steps)) .post-main { margin: 0 auto; }
.steps { position: sticky; top: calc(var(--sticky-top) + 24px); font-size: .92rem; }
.steps summary { margin-bottom: 8px; color: var(--muted-ink); font-size: .8rem; font-weight: 800; letter-spacing: .02em; cursor: pointer; }
.steps ol { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; }
.steps a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 12px; color: #444; font-weight: 600; transition: background-color var(--ease), color var(--ease); }
.steps a::before { content: counter(step); flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--bg-soft); color: var(--muted-ink); font-size: .8rem; font-weight: 800; transition: background-color var(--ease), color var(--ease); }
.steps a:hover { background: var(--bg-soft); }
.steps a.is-active { background: var(--accent-soft); color: var(--accent-ink); }
.steps a.is-active::before { background: var(--accent); color: #fff; }
@supports selector(::details-content) {
  @media (min-width: 1025px) {
    .steps summary { pointer-events: none; list-style: none; }
    .steps summary::-webkit-details-marker { display: none; }
    .steps details::details-content { content-visibility: visible; display: block; }
  }
}
.post-head { margin-bottom: 28px; }
.post-head h1 { margin: 14px 0 10px; font-size: 2.4rem; font-weight: 900; letter-spacing: -.025em; line-height: 1.25; }
.post-head a.chip-tool:hover { background: var(--ink); color: #fff; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; color: var(--muted-ink); font-weight: 600; }
.verify { padding: 2px 10px; border-radius: 999px; background: var(--bg-soft); color: var(--muted-ink); font-size: .8rem; font-weight: 800; }
.verify.is-ok { background: #e7f6ec; color: #1d6b39; }
.post-main .body + .body { margin-top: 0; }
.newsletter { margin: 36px 0; padding: 24px 26px 14px; border-radius: 20px; background: var(--tint-a); border: 1px solid #ffdcc4; }
.newsletter-title { margin: 0 0 12px; font-size: 1.1rem; font-weight: 800; }
.newsletter-row { display: flex; flex: 1; gap: 8px; min-width: 0; }
.newsletter-row input { flex: 1; min-width: 0; height: 44px; padding: 0 18px; border: 1px solid var(--line-strong); border-radius: 999px; background: #fff; font: inherit; }
.soon-msg { display: block; min-height: 1.3em; margin-top: 6px; line-height: 1.3; color: var(--accent-ink); font-size: .9rem; font-weight: 700; opacity: 0; transition: opacity .2s; }
.soon-msg.is-on { opacity: 1; }
.post-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line-strong); }
.post-actions .soon-msg { flex-basis: 100%; margin: 0; }
.body img { cursor: zoom-in; }
.body a img { cursor: pointer; }

/* ---------- 스크립트 없이 볼 때 ---------- */
html:not(.js) .finder, html:not(.js) .menu-btn, html:not(.js) #tool-select, html:not(.js) .copy, html:not(.js) .newsletter, html:not(.js) .post-actions { display: none; }
html:not(.js) .site-nav { display: block; }
.lightbox { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 24px; background: rgba(15, 16, 18, 0); cursor: zoom-out; transition: background-color .2s; }
.lightbox img { max-width: min(1100px, 100%); max-height: 88vh; border-radius: 12px; box-shadow: 0 30px 80px rgba(0, 0, 0, .4); transform: scale(.82); opacity: 0; transition: transform .22s cubic-bezier(.2, .8, .2, 1), opacity .22s; }
.lightbox.is-open { background: rgba(15, 16, 18, .82); }
.lightbox.is-open img { transform: none; opacity: 1; }

/* ---------- 좁은 화면 ---------- */
@media (max-width: 1024px) {
  .post-layout { display: block; }
  .steps { position: static; margin-bottom: 24px; padding: 12px 16px; border: 2px solid var(--line); border-radius: 16px; }
  .steps summary { margin: 0; color: var(--ink); font-size: .95rem; }
  .steps ol { margin-top: 8px; }
}
@media (max-width: 640px) {
  :root { --sticky-top: 57px; }
  .site-nav, #tool-select { display: none; }
  .menu-btn { display: grid; margin-left: 0; }
  .posts-page .page-title { font-size: 1.75rem; }
  .finder-field input { height: 50px; font-size: 16px; }
  .filter-btn { display: inline-flex; min-height: 50px; }
  .sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; max-height: 82vh; margin: 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); overflow-y: auto; border-radius: 22px 22px 0 0; background: #fff; box-shadow: 0 -12px 40px rgba(0, 0, 0, .18); transform: translateY(100%); visibility: hidden; transition: transform .28s cubic-bezier(.2, .8, .2, 1), visibility 0s .28s; }
  .sheet-head { display: flex; }
  .sheet-foot { display: flex; gap: 10px; margin-top: 16px; }
  .sheet-foot .btn-accent { flex: 1; min-height: 50px; }
  .filter-row { margin-bottom: 14px; }
  .filter-label { width: 100%; }
  .finder-meta .link-btn { margin-left: auto; }
  .post-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .post-card { min-height: 0; padding: 20px; }
  .post-card.alt2 { background: var(--tint-a); }
  .post-card.alt1 { background: var(--tint-b); }
  .post-card-title { font-size: 1.2rem; }
  .post-layout { margin-top: 20px; }
  .post-head h1 { font-size: 1.7rem; }
  .newsletter { padding: 20px; }
  .newsletter-row { flex-wrap: wrap; }
  .newsletter-row .btn { flex: 1; }
  .post-actions > .btn { flex: 1; }
  .dock-cta { padding: 0 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  a.card:hover, .post-row:hover, .post-card:hover, .marquee-card:hover, .pill:hover, .more-btn:hover, .btn:hover, .chip-btn:hover, .dock-cta:hover, .menu-btn:hover, .post-card:hover .arrow { transform: none; }
  .marquee { overflow-x: auto; }
}
