/* ============================================================
   pages.css — 내부 페이지(포트폴리오 / 블로그) 공통
   ============================================================ */

.page { max-width: var(--maxw); margin: 0 auto; padding: 3rem 1.5rem 5rem; }
.page__head { margin-bottom: 2rem; }
.page__head h1 {
  font-family: "Inter", var(--font-body);
  font-weight: 900; text-transform: uppercase;
  letter-spacing: -0.01em; color: var(--gold);
  font-size: clamp(2rem, 6vw, 3.4rem); line-height: 1;
}
.page__head p { color: var(--text-soft); margin-top: 0.5rem; }

/* ---------- 태그 필터 ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 2rem; }
.filter-btn {
  font-size: 0.78rem; letter-spacing: 0.06em;
  padding: 0.45rem 1rem; border-radius: 999px;
  border: 1px solid var(--line); color: var(--text-soft);
  background: var(--bg-soft); transition: all 0.22s var(--ease);
}
.filter-btn:hover { border-color: var(--gold-dim); color: var(--text); }
.filter-btn[aria-pressed="true"] {
  background: var(--gold); color: #ffffff; border-color: var(--gold); font-weight: 700;
}

/* ---------- 격자 ---------- */
.grid {
  display: grid; gap: 1.4rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

/* 카드 공통 */
.card {
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 16px; overflow: hidden; cursor: pointer;
  display: flex; flex-direction: column;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(0,0,0,0.12); }
.card__thumb {
  aspect-ratio: 16 / 10; background: var(--bg);
  display: grid; place-items: center; font-size: 2.4rem; color: var(--text-mute);
  border-bottom: 1px solid var(--line);
}
.card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: 1.1rem 1.2rem 1.3rem; flex: 1; display: flex; flex-direction: column; }
.card__tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.6rem; }
.card__tag {
  font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--gold); border: 1px solid var(--gold-dim); border-radius: 999px;
  padding: 0.15rem 0.55rem;
}
.card__title { font-family: var(--font-brand); font-size: 1.1rem; line-height: 1.3; }
.card__summary { font-size: 0.85rem; color: var(--text-soft); margin-top: 0.5rem; line-height: 1.6; }
.card__date { font-size: 0.75rem; color: var(--text-mute); margin-top: auto; padding-top: 0.8rem; }

.empty { color: var(--text-mute); padding: 2rem 0; }

/* ---------- PDF 뷰어 모달 ---------- */
.viewer {
  position: fixed; inset: 0; z-index: 300;
  display: none; place-items: center; padding: 4vh 4vw;
  background: rgba(20,16,12,0.6); backdrop-filter: blur(4px);
}
.viewer[data-open="true"] { display: grid; }
.viewer__frame {
  position: relative; width: min(1000px, 100%); height: 88vh;
  background: var(--bg-soft); border-radius: 16px; overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,0.4);
  display: flex; flex-direction: column;
}
.viewer__bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.8rem 1.2rem; border-bottom: 1px solid var(--line);
}
.viewer__bar h3 { font-family: var(--font-brand); font-size: 1rem; }
.viewer__bar .right { display: flex; gap: 0.6rem; align-items: center; }
.viewer__dl { font-size: 0.8rem; color: var(--gold); }
.viewer__close {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line); color: var(--text-soft);
}
.viewer__close:hover { color: var(--gold); border-color: var(--gold-dim); }
.viewer iframe { flex: 1; width: 100%; border: 0; background: #fff; }
.viewer__fallback { padding: 2rem; text-align: center; color: var(--text-soft); }

/* ============================================================
   상세 페이지 (블로그 / 포트폴리오 공통)
   가운데 좁은 본문(measure) + 넓게 튀어나오는 미디어
   ============================================================ */
:root { --measure: 52rem; }   /* 본문 한 줄 폭 ≈ 832px */

.article {
  --wide: 72rem;               /* 미디어 최대 폭 ≈ 1152px */
  max-width: var(--wide);
  margin: 0 auto;
  /* 3트랙: [넓은여백 | 본문 | 넓은여백] — 미디어는 가장자리까지 확장 */
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    min(var(--measure), 100%)
    minmax(0, 1fr);
}
/* 기본적으로 모든 직계 자식은 가운데(본문) 트랙에 */
.article > * { grid-column: 2; }

/* 넓게 펼칠 요소: 미디어 블록 */
.article__media,
.media-wide {
  grid-column: 1 / -1;
  width: 100%;
}

.article__back {
  font-size: 0.85rem; color: var(--text-soft); display: inline-block; margin-bottom: 2rem;
}
.article__back:hover { color: var(--gold); }
.article__head { margin-bottom: 2rem; }
.article__head .card__tags { margin-bottom: 1rem; }
.article h1 {
  font-family: var(--font-brand); font-size: clamp(1.9rem, 4.5vw, 2.8rem);
  line-height: 1.25; color: var(--text);
}
.article__meta {
  color: var(--text-mute); font-size: 0.85rem; margin-top: 1rem;
  padding-bottom: 0.2rem;
}
.article__subtitle {
  margin-top: 0.8rem;
  color: var(--text-soft);
  font-size: 1.08rem;
  line-height: 1.7;
}
.article__live {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 1rem; padding: 0.5rem 1.1rem;
  border: 1px solid var(--gold); border-radius: 999px;
  color: var(--gold); font-size: 0.9rem; font-weight: 700;
  transition: background var(--speed) var(--ease), color var(--speed) var(--ease);
}
.article__live:hover { background: var(--gold); color: #fff; }

/* ---------- 본문 미디어 (영상) ---------- */
.article__media {
  width: min(100%, 60rem);
  justify-self: center;
  margin: 2.4rem auto;
}
.article__video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 16px;
  background: #0f1115;
  border: 1px solid var(--line);
  box-shadow: 0 18px 44px rgba(0,0,0,0.18);
}
.article__video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #0f1115;
}
.article__video.is-unavailable { opacity: 0.18; }
.article__video-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255,255,255,0.82);
  font-size: 0.9rem;
  background: linear-gradient(135deg, rgba(15,17,21,0.76), rgba(15,17,21,0.92));
}
.article__video-fallback[hidden] { display: none; }

/* ---------- 본문 미디어 (이미지) ---------- */
.article__image-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 0.9rem;
  margin: 2.6rem 0;
}
.article__image-strip img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
}
/* 본문 흐름 중간 단일 이미지/영상 (블로그·포트폴리오 공용) */
figure.media-wide { margin: 2.8rem auto; }
/* .article__body 안에 들어간 미디어는 measure 밖으로 펼침
   (본문 텍스트 폭 46rem → 미디어 64rem, 양쪽 9rem씩 확장. 좁은 화면에선 0) */
.article__body figure.media-wide,
.article__body .article__image-strip {
  --bleed: clamp(0rem, calc((100vw - var(--measure)) / 2 - 1.5rem), 9rem);
  width: calc(100% + var(--bleed) * 2);
  margin-left: calc(var(--bleed) * -1);
  margin-right: calc(var(--bleed) * -1);
}
figure.media-wide img,
figure.media-wide video {
  width: 100%;
  display: block;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  box-shadow: 0 18px 44px rgba(0,0,0,0.16);
}
figure.media-wide video { aspect-ratio: 16 / 9; object-fit: cover; background: #0f1115; }
figure.media-wide figcaption {
  margin-top: 0.75rem;
  text-align: center;
  color: var(--text-mute);
  font-size: 0.85rem;
  line-height: 1.5;
}

.article__section-title {
  margin: 3rem 0 1rem;
  color: var(--text);
  font-family: var(--font-brand);
  font-size: 1.4rem;
  line-height: 1.35;
}
/* 대표 커버 (없으면 회색 빈 박스) */
.article__cover {
  aspect-ratio: 16 / 9; background: var(--line);
  border-radius: 16px; overflow: hidden; margin: 0.5rem auto 2.8rem;
  border: 1px solid var(--line);
}
.article__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.yt-embed {
  position: relative; aspect-ratio: 16 / 9;
  margin: 0 0 1.5rem; border-radius: 12px; overflow: hidden; background: #000;
}
.yt-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- 본문 텍스트: 가독성 핵심 ---------- */
.article__body {
  color: var(--text);
  line-height: 1.85;
  font-size: 1.12rem;
  letter-spacing: -0.003em;
  word-break: keep-all;       /* 한글 단어 단위 줄바꿈 */
  overflow-wrap: anywhere;
}
.article__body p { margin: 0 0 1.5rem; }
.article__body h2 {
  font-family: var(--font-brand);
  font-size: 1.45rem; line-height: 1.35;
  margin: 2.6rem 0 1rem; color: var(--text);
}
.article__body h3 {
  font-size: 1.15rem; line-height: 1.4; font-weight: 700;
  margin: 2rem 0 0.8rem; color: var(--text);
}
.article__body a { color: var(--gold); text-decoration: underline; text-underline-offset: 2px; }
.article__body ul, .article__body ol { margin: 0 0 1.5rem; padding-left: 1.3rem; }
.article__body li { margin-bottom: 0.5rem; }
.article__body blockquote {
  margin: 2rem 0; padding: 0.4rem 0 0.4rem 1.3rem;
  border-left: 3px solid var(--gold-dim);
  color: var(--text-soft); font-style: italic;
}

/* ============================================================
   About 페이지 + Guestbook 섹션
   ============================================================ */
.about { max-width: none; margin: 0 0 3.5rem; }
.about__head { display: flex; align-items: flex-start; gap: 1.5rem; }
.about__avatar {
  width: 144px; height: 192px; border-radius: 24px; flex: 0 0 auto;
  background: var(--bg-soft); border: 1px solid var(--line);
  display: grid; place-items: center; font-size: 2.4rem;
  overflow: hidden;
}
.about__avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.about__name { font-family: var(--font-brand); font-size: 1.9rem; line-height: 1.1; }
.about__role { color: var(--text-soft); font-size: 0.9rem; margin-top: 0.3rem; letter-spacing: 0.04em; }
.about__contact--head { margin-top: 0.5rem; font-size: 0.9rem; }
.about__tagline {
  font-family: var(--font-brand); font-size: 1.25rem; line-height: 1.5;
  margin: 2rem 0 1rem; color: var(--text);
}
.about__summary { color: var(--text-soft); line-height: 1.8; }
.about__section-title {
  font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold); margin: 2.2rem 0 0.8rem;
}
.about__contact a { color: var(--gold); }
.about__strengths { display: flex; flex-direction: column; gap: 0.5rem; list-style: none; }
.about__strengths li {
  position: relative; padding-left: 1.1rem; color: var(--text-soft); line-height: 1.6;
}
.about__strengths li::before {
  content: ""; position: absolute; left: 0; top: 0.6em;
  width: 5px; height: 5px; border-radius: 50%; background: var(--gold);
}
.about__workstyle { color: var(--text-soft); line-height: 1.8; }
/* about 본문 텍스트만 가독성 위해 800px 폭 제한 (헤더/아바타는 제외) */
.about__tagline,
.about__summary,
.about__section-title,
.about .card__tags,
.about__strengths,
.about__workstyle,
.about .timeline,
.about__contact,
.about .tool-chips,
.about .tool-note,
.about__intro { max-width: 800px; }
.about__intro {
  margin-top: 3rem; padding-top: 2.5rem; border-top: 1px solid var(--line);
}
.about__intro-title {
  font-family: var(--font-brand); font-size: 1.3rem; line-height: 1.4;
  margin-bottom: 1rem; color: var(--text);
}
.about__intro p { color: var(--text-soft); line-height: 1.8; margin-bottom: 0.9rem; }

.guestbook-section { max-width: none; margin: 0; padding-top: 2.5rem; border-top: 1px solid var(--line); }
.gb-heading { font-family: var(--font-brand); }
.gb-sub { color: var(--text-soft); margin-top: 0.4rem; font-size: 0.9rem; }

.gb-form { display: flex; gap: 0.6rem; margin: 1.4rem 0 0.5rem; flex-wrap: wrap; }
.gb-form input {
  font: inherit; padding: 0.7rem 0.9rem; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg-soft); color: var(--text);
}
.gb-form #gbName { width: 120px; }
.gb-form #gbMsg { flex: 1; min-width: 180px; }
.gb-form input:focus { outline: none; border-color: var(--gold-dim); }
.gb-submit {
  background: var(--gold); color: #ffffff; font-weight: 700;
  padding: 0 1.3rem; border-radius: 10px; white-space: nowrap;
}
.gb-formnote { font-size: 0.76rem; color: var(--text-mute); margin-bottom: 1.4rem; }

/* ============================================================
   방명록 포스트잇 보드
   ============================================================ */
.postit-board {
  display: grid; gap: 1.6rem 1.4rem;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  margin: 1.6rem 0 0.6rem;
}

.postit {
  position: relative;
  min-height: 190px; padding: 1.3rem 1.1rem 1rem;
  background: #fde98a;
  font-family: var(--font-body);
  color: #4a3d12;
  box-shadow: 0 6px 14px rgba(0,0,0,0.18);
  border-radius: 2px;
  display: flex; flex-direction: column; gap: 0.5rem;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
/* 살짝 기울임 — 짝수/홀수 다르게 */
.postit:nth-child(3n+1) { transform: rotate(-2.2deg); }
.postit:nth-child(3n+2) { transform: rotate(1.6deg); }
.postit:nth-child(3n+3) { transform: rotate(-0.8deg); }
.postit:hover { transform: rotate(0) scale(1.03); box-shadow: 0 12px 24px rgba(0,0,0,0.22); z-index: 2; }

/* 색 변형 */
.postit--pink  { background: #fcc7d4; color: #5a2533; }
.postit--blue  { background: #bfe0f5; color: #1f3d52; }
.postit--green { background: #c9ecb0; color: #2c4519; }

/* 압정 */
.postit::before {
  content: ""; position: absolute; top: -8px; left: 50%;
  width: 14px; height: 14px; border-radius: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle at 35% 30%, #ff7a7a, #c0392b);
  box-shadow: 0 2px 3px rgba(0,0,0,0.35);
}
.postit__msg-text { font-size: 0.95rem; line-height: 1.5; flex: 1; word-break: break-word; }
.postit__foot { display: flex; justify-content: space-between; align-items: baseline; font-size: 0.8rem; }
.postit__author { font-weight: 700; }
.postit__date { font-size: 0.72rem; opacity: 0.65; }

/* 작성용 포스트잇 */
.postit--write { background: #fff7c2; transform: rotate(0) !important; }
.postit--write:hover { transform: rotate(0) scale(1.02) !important; }
.postit__name, .postit__msg {
  font-family: inherit; color: inherit;
  background: transparent; border: none; border-bottom: 1px dashed rgba(74,61,18,0.4);
  padding: 0.2rem 0; width: 100%;
}
.postit__name { font-size: 1.05rem; font-weight: 700; }
.postit__msg { font-size: 0.95rem; line-height: 1.5; flex: 1; resize: none; border-bottom: none; }
.postit__name::placeholder, .postit__msg::placeholder { color: rgba(74,61,18,0.45); }
.postit__name:focus, .postit__msg:focus { outline: none; }
.postit__pin {
  align-self: flex-end; font-family: inherit; font-size: 0.95rem; font-weight: 700;
  background: #4a3d12; color: #fff7c2; padding: 0.35rem 0.9rem; border-radius: 4px;
  transition: transform 0.15s var(--ease);
}
.postit__pin:hover { transform: translateY(-2px); }

/* About 커리어 타임라인 */
.timeline { display: flex; flex-direction: column; gap: 0.7rem; }
.timeline li { display: flex; gap: 1rem; align-items: baseline; }
.timeline .tl-when { flex: 0 0 92px; color: var(--gold); font-size: 0.82rem; font-weight: 700; }
.timeline .tl-what { color: var(--text-soft); }

/* 작성 포스트잇 푸터: 닉네임(좌) + 붙이기(우) */
.postit__write-foot { display: flex; align-items: center; gap: 0.5rem; }
.postit__nick {
  flex: 1; min-width: 0; font: inherit; font-size: 0.85rem; font-weight: 700;
  background: rgba(255,255,255,0.5); color: #4a3d12;
  border: 1px solid rgba(74,61,18,0.25); border-radius: 6px;
  padding: 0.4rem 0.6rem;
}
.postit__nick:focus { outline: none; border-color: rgba(74,61,18,0.55); background: #fff; }


/* ============================================================
   블로그 에디토리얼 리스트
   ============================================================ */
.post-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.post-row {
  cursor: pointer;
  padding: 2rem 0 2.1rem;
  border-bottom: 1px solid var(--line);
}
.post-row__meta {
  margin-bottom: 0.7rem;
  color: var(--text-mute);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.post-row__body {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-width: 820px;
}
.post-row__title {
  font-family: var(--font-brand);
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.28;
  color: var(--text);
}
.post-row__summary {
  font-size: 0.98rem;
  color: var(--text-soft);
  line-height: 1.75;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-row:hover .post-row__title { color: var(--gold); }

/* ============================================================
   포트폴리오 큰 커버 그리드 쇼케이스 (.work)
   ============================================================ */
.grid--work { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1.8rem; }
.work {
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 18px; overflow: hidden; cursor: pointer;
  display: flex; flex-direction: column;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.work:hover { transform: translateY(-5px); box-shadow: 0 24px 50px rgba(0,0,0,0.16); }

.work__cover {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden;
  display: flex; align-items: flex-start; padding: 1rem;
}
.work__cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.work__cover::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.05), rgba(0,0,0,0.35));
  opacity: 0; transition: opacity 0.25s var(--ease);
}
.work:hover .work__cover::after { opacity: 1; }

.work__tags { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.work__tag {
  font-size: 0.64rem; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700;
  color: #fff; background: rgba(255,255,255,0.22); border: 1px solid rgba(255,255,255,0.35);
  border-radius: 999px; padding: 0.18rem 0.6rem; backdrop-filter: blur(6px);
}
.work__open {
  position: absolute; left: 50%; bottom: 1rem; transform: translate(-50%, 8px);
  z-index: 2; color: #fff; font-size: 0.85rem; font-weight: 700; letter-spacing: 0.02em;
  opacity: 0; transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.work:hover .work__open { opacity: 1; transform: translate(-50%, 0); }

.work__body { padding: 1.1rem 1.3rem 1.4rem; flex: 1; display: flex; flex-direction: column; }
.work__title { font-family: var(--font-brand); font-size: 1.2rem; line-height: 1.35; }
.work__subtitle {
  margin-top: 0.45rem;
  color: var(--text-soft);
  font-size: 0.84rem;
  line-height: 1.55;
}
.work__summary {
  font-size: 0.86rem; color: var(--text-soft); margin-top: 0.55rem; line-height: 1.65;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.work__date { font-size: 0.75rem; color: var(--text-mute); margin-top: auto; padding-top: 0.9rem; }

/* ============================================================
   포트폴리오 상세 — PDF.js 페이지 뷰어
   ============================================================ */
/* PDF가 있으면 article 자체를 살짝 넓혀 뷰어가 시원하게 */
.article:has(.pdfview) { --wide: 76rem; }
/* PDF 뷰어 섹션은 넓은 트랙 전체 사용 */
.article__pdf { grid-column: 1 / -1; margin-top: 1rem; }
.pdfview { margin-top: 1.4rem; }
.pdfview__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 1rem;
  align-items: start;
}
.pdfview__stage {
  position: relative; display: flex; align-items: center; justify-content: center;
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
  padding: 1rem; min-height: 200px; overflow: hidden;
}
.pdfview__canvas {
  max-width: 100%; height: auto; display: block;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12); border-radius: 4px; background: #fff;
}
.pdfview__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%; z-index: 2;
  display: grid; place-items: center; cursor: pointer;
  background: var(--bg-soft); border: 1px solid var(--line); color: var(--text);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  transition: background 0.18s var(--ease), opacity 0.18s var(--ease);
}
.pdfview__nav svg { width: 18px; height: 18px; }
.pdfview__nav:hover { background: var(--gold); color: #fff; border-color: var(--gold); }
.pdfview__nav:disabled { opacity: 0.3; cursor: default; }
.pdfview__nav:disabled:hover { background: var(--bg-soft); color: var(--text); border-color: var(--line); }
.pdfview__prev { left: 12px; }
.pdfview__next { right: 12px; }
.pdfview__toc {
  position: sticky;
  top: 5.5rem;
  max-height: min(68vh, 560px);
  overflow-y: auto;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
}
.pdfview__toc-title {
  margin-bottom: 0.65rem;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
}
.pdfview__toc-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.pdfview__toc-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  padding: 0.52rem 0.6rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text-soft);
  font: inherit;
  font-size: 0.78rem;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease), color 0.18s var(--ease);
}
.pdfview__toc-btn span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pdfview__toc-btn small {
  flex: 0 0 auto;
  color: var(--text-mute);
  font-size: 0.68rem;
}
.pdfview__toc-btn:hover,
.pdfview__toc-btn.is-active {
  border-color: var(--gold-dim);
  background: color-mix(in srgb, var(--gold) 12%, transparent);
  color: var(--text);
}
.pdfview__toc-btn.is-active small { color: var(--gold); }
.pdfview__bar {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 0.8rem; font-size: 0.85rem; color: var(--text-soft);
}
@media (max-width: 860px) {
  .pdfview__layout { grid-template-columns: 1fr; }
  .pdfview__toc {
    position: static;
    max-height: none;
  }
}
@media (max-width: 640px) {
  .article__body { font-size: 1.05rem; line-height: 1.8; }
  figure.media-wide img, figure.media-wide video,
  .article__cover, .article__video-frame { border-radius: 12px; }
}

/* About: 사용 도구 칩 (로고 + 이름) */
.tool-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tool-chip {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.4rem 0.85rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg-soft);
  font-size: 0.82rem; color: var(--text); white-space: nowrap;
  transition: border-color 0.18s var(--ease), transform 0.18s var(--ease);
}
.tool-chip:hover { border-color: var(--gold-dim); transform: translateY(-1px); }
.tool-chip svg { width: 16px !important; height: 16px !important; flex: 0 0 auto; max-width: 16px; color: var(--text-soft); }
.tool-chip__abbr {
  width: 16px; height: 16px; flex: 0 0 auto; display: grid; place-items: center;
  font-size: 0.6rem; font-weight: 800; color: var(--text-soft);
}
.tool-chip__name { line-height: 1; }

/* About: 도구 활용 설명 */
.tool-note { margin-top: 0.9rem; }
.tool-note p { color: var(--text-soft); line-height: 1.7; font-size: 0.9rem; margin-bottom: 0.4rem; }

/* About tools: keep generated SVG logos compact even if earlier CSS is malformed. */
.about .tool-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.about .tool-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 30px;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1;
  white-space: nowrap;
}
.about .tool-chip svg,
.about .tool-chip__abbr {
  width: 16px !important;
  height: 16px !important;
  flex: 0 0 16px;
  max-width: 16px;
  max-height: 16px;
  display: block;
  color: var(--text-soft);
}
.about .tool-chip__abbr {
  display: grid;
  place-items: center;
  font-size: 0.6rem;
  font-weight: 800;
}
.about .tool-chip__name {
  line-height: 1;
}
