/*
 * 글자 크기 조절 (2026-11-27 사용자: 어르신을 위해 두 사이트(블로그·/pol) 맨 위에 글자 크기 조절, 기본은 2px 크게)
 *   --fs = 모든 글자에 더하는 크기. 기본 2px, 사용자가 고르면 html 의 style 로 0·2·5·8px (fontsize.js, 고른 값은 브라우저에 저장)
 *   블로그(blog.css)는 font-size 가 모두 calc(Npx + var(--fs)) 로 되어 있다.
 *   /pol 은 Tailwind(rem) 라서 아래에서 text-* 글자 크기에 --fs 를 더한다 (간격은 그대로).
 */
:root { --fs: 2px; }
html body { font-size: calc(16px + var(--fs)); }

/* ---- 맨 위 글자 크기 띠 (띠 자체 글자는 --fs 와 상관없이 고정 — 누를 때마다 단추가 움직이지 않게) ---- */
.fs-bar { position: relative; z-index: 60; background: #1F2937; color: #fff; font-family: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif; font-size: 14px; line-height: 1.2; }
.fs-wrap { position: relative; max-width: 1120px; margin: 0 auto; padding: 6px 16px; display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.fs-label { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 800; white-space: nowrap; }
.fs-ico { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: #FACC15; color: #111827; font-size: 15px; font-weight: 900; }
.fs-btns { display: flex; gap: 4px; border-radius: 10px; }
.fs-btns button { min-height: 34px; padding: 0 11px; border: 1px solid rgba(255, 255, 255, .35); border-radius: 8px; background: transparent; color: #fff; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.fs-btns button:hover { background: rgba(255, 255, 255, .12); }
.fs-btns button:focus-visible { outline: 3px solid #FACC15; outline-offset: 2px; }
.fs-btns button[aria-pressed="true"] { background: #FACC15; border-color: #FACC15; color: #111827; }
.fs-btns button[data-fs="5"] { font-size: 15.5px; }
.fs-btns button[data-fs="8"] { font-size: 17px; }

/* 처음 온 사람에게 잠깐 보이는 안내 말풍선 */
.fs-nudge { position: absolute; right: 16px; top: calc(100% + 10px); z-index: 61; max-width: 280px; padding: 11px 36px 11px 14px; border-radius: 12px; background: #FACC15; color: #111827; font-size: 15.5px; font-weight: 800; line-height: 1.45; box-shadow: 0 8px 22px rgba(17, 24, 39, .25); opacity: 0; transform: translateY(-6px); transition: opacity .35s, transform .35s; pointer-events: none; }
.fs-nudge::before { content: ""; position: absolute; top: -8px; right: 48px; border: 8px solid transparent; border-top: 0; border-bottom-color: #FACC15; }
.fs-nudge.is-on { opacity: 1; transform: none; pointer-events: auto; }
.fs-nudge small { display: block; margin-top: 2px; font-size: 13px; font-weight: 600; }
.fs-nudge-x { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border: 0; border-radius: 50%; background: rgba(17, 24, 39, .1); color: #111827; font-size: 16px; line-height: 26px; cursor: pointer; padding: 0; }
.fs-btns.is-pulse { animation: fs-pulse 1.4s ease-out 3; }
@keyframes fs-pulse { 0% { box-shadow: 0 0 0 0 rgba(250, 204, 21, .75); } 100% { box-shadow: 0 0 0 12px rgba(250, 204, 21, 0); } }
@media (prefers-reduced-motion: reduce) { .fs-btns.is-pulse { animation: none; } .fs-nudge { transition: none; } }
@media (max-width: 420px) {
  .fs-wrap { justify-content: space-between; gap: 6px; padding: 6px 12px; }
  .fs-btns button { padding: 0 8px; }
  .fs-nudge { right: 12px; left: 12px; max-width: none; }
}
@media (max-width: 370px) { .fs-label-t { display: none; } }

/* ---- /pol (Tailwind) 글자 크기: 기본 크기 + --fs ---- */
html body .text-xs { font-size: calc(.75rem + var(--fs)); }
html body .text-sm { font-size: calc(.875rem + var(--fs)); }
html body .text-base { font-size: calc(1rem + var(--fs)); }
html body .text-lg { font-size: calc(1.125rem + var(--fs)); }
html body .text-xl { font-size: calc(1.25rem + var(--fs)); }
html body .text-2xl { font-size: calc(1.5rem + var(--fs)); }
html body .text-3xl { font-size: calc(1.875rem + var(--fs)); }
html body .text-4xl { font-size: calc(2.25rem + var(--fs)); }
html body .text-5xl { font-size: calc(3rem + var(--fs)); }
@media (min-width: 640px) {
  html body .sm\:text-sm { font-size: calc(.875rem + var(--fs)); } html body .sm\:text-base { font-size: calc(1rem + var(--fs)); }
  html body .sm\:text-lg { font-size: calc(1.125rem + var(--fs)); } html body .sm\:text-xl { font-size: calc(1.25rem + var(--fs)); }
  html body .sm\:text-2xl { font-size: calc(1.5rem + var(--fs)); } html body .sm\:text-3xl { font-size: calc(1.875rem + var(--fs)); }
  html body .sm\:text-4xl { font-size: calc(2.25rem + var(--fs)); } html body .sm\:text-5xl { font-size: calc(3rem + var(--fs)); }
}
@media (min-width: 768px) {
  html body .md\:text-sm { font-size: calc(.875rem + var(--fs)); } html body .md\:text-base { font-size: calc(1rem + var(--fs)); }
  html body .md\:text-lg { font-size: calc(1.125rem + var(--fs)); } html body .md\:text-xl { font-size: calc(1.25rem + var(--fs)); }
  html body .md\:text-2xl { font-size: calc(1.5rem + var(--fs)); } html body .md\:text-3xl { font-size: calc(1.875rem + var(--fs)); }
  html body .md\:text-4xl { font-size: calc(2.25rem + var(--fs)); } html body .md\:text-5xl { font-size: calc(3rem + var(--fs)); }
}
@media (min-width: 1024px) {
  html body .lg\:text-lg { font-size: calc(1.125rem + var(--fs)); } html body .lg\:text-xl { font-size: calc(1.25rem + var(--fs)); }
  html body .lg\:text-2xl { font-size: calc(1.5rem + var(--fs)); } html body .lg\:text-3xl { font-size: calc(1.875rem + var(--fs)); }
  html body .lg\:text-4xl { font-size: calc(2.25rem + var(--fs)); } html body .lg\:text-5xl { font-size: calc(3rem + var(--fs)); }
}
