/* 푸푸 블로그 — 포트폴리오와 같은 글꼴·색. 장식 없이 글이 주인공 */
:root {
  --text: #191f28; --sub: #4e5968; --muted: #8b95a1; --faint: #b0b8c1;
  --line: #eceef1; --gray: #f2f4f6; --gray-2: #f9fafb; --ink: #121212;
  --pad: clamp(20px, 5vw, 40px); --col: 680px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; word-break: keep-all; overflow-wrap: anywhere; -webkit-tap-highlight-color: transparent; }
body { background: #fff; color: var(--text); font-family: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", sans-serif; letter-spacing: -0.01em; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; border-radius: 6px; }

.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; height: calc(56px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) var(--pad) 0; background: rgba(255,255,255,.9); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px); box-shadow: 0 1px 0 rgba(0,0,0,.05); }
.top__home { font-size: 17px; font-weight: 700; padding: 8px 0; }
.top__blog { font-size: 15px; font-weight: 600; color: var(--sub); padding: 8px 0; }

.wrap { max-width: calc(var(--col) + var(--pad) * 2); margin: 0 auto; padding: 0 var(--pad); }

/* 푸푸 얼굴: 동그라미 안에 캐릭터 머리만 */
.face { position: relative; display: block; width: 88px; height: 88px; border-radius: 50%; border: 3px solid var(--ink); background: #fff; overflow: hidden; }
.face .chr { position: absolute; left: 50%; top: -17%; width: 118%; height: auto; transform: translateX(-50%); overflow: hidden; }
.face--sm { display: inline-block; width: 32px; height: 32px; border-width: 2px; vertical-align: middle; }

/* 목록 */
.intro { padding: clamp(48px, 9vh, 88px) 0 32px; }
.intro h1 { margin-top: 24px; font-size: clamp(40px, 8vw, 64px); font-weight: 800; letter-spacing: -0.05em; line-height: 1.1; }
.intro p { margin-top: 16px; font-size: clamp(16px, 1.6vw, 18px); line-height: 1.75; color: var(--sub); max-width: 32em; }
.tabs { display: flex; gap: 4px; overflow-x: auto; margin: 8px calc(var(--pad) * -1) 0; padding: 0 var(--pad) 4px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: none; height: 40px; padding: 0 14px; border: 0; border-radius: 12px; background: none; font: inherit; font-size: 15px; font-weight: 600; color: var(--muted); cursor: pointer; }
.tabs button:hover { color: var(--text); }
.tabs button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.posts { margin: 16px 0 96px; border-top: 1.5px solid var(--text); }
.post { border-bottom: 1px solid var(--line); }
.post a { display: block; padding: 28px 0; }
.post a:hover .post__title { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px; }
.post__meta { display: flex; flex-wrap: wrap; gap: 4px 0; font-size: 14px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.post__meta > * + *::before { content: "·"; margin: 0 8px; }
.post__title { margin-top: 8px; font-size: clamp(21px, 2.6vw, 26px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.35; }
.post__sum { margin-top: 8px; font-size: 16px; line-height: 1.7; color: var(--sub); }
.empty { margin: 24px 0 120px; padding: 40px 0; border-top: 1.5px solid var(--text); font-size: 17px; color: var(--muted); }

/* 글 */
.article { padding: clamp(32px, 6vh, 64px) 0 0; }
.back { display: inline-block; margin-bottom: 28px; font-size: 15px; font-weight: 600; color: var(--muted); }
.back:hover { color: var(--text); }
.article__title { margin-top: 12px; font-size: clamp(30px, 5.4vw, 46px); font-weight: 800; letter-spacing: -0.045em; line-height: 1.25; }
.byline { display: flex; align-items: center; gap: 10px; margin-top: 20px; padding-bottom: 28px; border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 700; }
.prose { padding-top: 32px; font-size: 17.5px; line-height: 1.85; color: #2b333f; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { margin-top: 2em; font-size: 24px; font-weight: 800; letter-spacing: -0.035em; line-height: 1.4; color: var(--text); }
.prose h3 { margin-top: 1.6em; font-size: 20px; font-weight: 700; letter-spacing: -0.03em; color: var(--text); }
.prose strong { font-weight: 700; color: var(--text); }
.prose a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--faint); }
.prose a:hover { text-decoration-color: var(--text); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose ul { list-style: disc; } .prose ol { list-style: decimal; }
.prose li + li { margin-top: .4em; }
.prose blockquote { padding: 4px 0 4px 18px; border-left: 3px solid var(--text); color: var(--sub); }
.prose code { padding: 2px 6px; border-radius: 6px; background: var(--gray); font-size: .9em; }
.prose pre { overflow-x: auto; padding: 18px 20px; border-radius: 14px; background: var(--gray); font-size: 14.5px; line-height: 1.65; }
.prose pre code { padding: 0; background: none; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.2em 0; }
.sign { margin-top: 56px; padding: 22px 24px; border-radius: 18px; background: var(--gray-2); font-size: 15px; line-height: 1.7; color: var(--sub); }
.sign a { color: var(--text); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 40px 0 96px; }
.pager a { display: block; padding: 18px 20px; border-radius: 16px; background: var(--gray-2); }
.pager a:hover { background: var(--gray); }
.pager a:last-child:not(:first-child) { text-align: right; }
.pager span { display: block; font-size: 13px; font-weight: 600; color: var(--muted); }
.pager b { display: block; margin-top: 4px; font-size: 15px; font-weight: 700; line-height: 1.45; }
@media (max-width: 520px) { .pager { grid-template-columns: 1fr; } .pager a:last-child:not(:first-child) { text-align: left; } }

.foot { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 28px var(--pad) calc(28px + env(safe-area-inset-bottom)); background: var(--gray); font-size: 14px; font-weight: 600; color: var(--muted); }
.foot a:hover { color: var(--text); }

/* ===================== 글 꾸미기 ===================== */
:root { --out: cubic-bezier(0.16, 1, 0.3, 1); }
.readbar { position: fixed; left: 0; right: 0; top: 0; z-index: 20; height: 3px; background: var(--ink); transform: scaleX(0); transform-origin: 0 50%; pointer-events: none; }

/* 형광펜: 글자 아래쪽만 옅게 깔리는 밑줄 느낌. 글자보다 튀지 않게 얇고 연하다 */
.hl {
  --c: 255, 208, 0;
  color: inherit; background-color: transparent; padding: 0 .04em; margin: 0;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  background-image: linear-gradient(to top, rgba(var(--c), .34) 0, rgba(var(--c), .34) .42em, transparent .42em);
  background-repeat: no-repeat; background-size: 0% 100%;
  transition: background-size .7s var(--out);
}
.hl.on { background-size: 100% 100%; }
.hl--green { --c: 46, 190, 120; }
.hl--pink { --c: 255, 120, 170; }
.hl--blue { --c: 80, 160, 255; }

/* 가린 글: 흐릿하게 흔들린 채로 있다가, 누르면 모션블러가 풀리며 또렷해진다 */
.spoil { filter: blur(5px); background: rgba(25,31,40,.07); border-radius: 6px; padding: 0 .12em; cursor: pointer; -webkit-user-select: none; user-select: none; transition: filter .25s, background .3s; }
.spoil:hover { filter: blur(3.5px); }
.spoil.open { filter: none; background: transparent; cursor: auto; -webkit-user-select: auto; user-select: auto; animation: unblur .7s var(--out); }
@keyframes unblur {
  0% { filter: blur(6px); transform: translateX(-5px) skewX(-10deg); opacity: .5; }
  55% { filter: blur(1.5px); transform: translateX(1px) skewX(2deg); opacity: 1; }
  100% { filter: blur(0); transform: none; }
}
.spoil.open { display: inline-block; }
.spoil-b { position: relative; margin-top: 1.1em; border-radius: 18px; overflow: hidden; background: var(--gray-2); }
.spoil-b__in { padding: 2px 4px; filter: blur(16px); transform: scale(1.03); opacity: .75; transition: filter .9s var(--out), transform .9s var(--out), opacity .6s; -webkit-user-select: none; user-select: none; }
.spoil-b__in > :first-child { margin-top: 0; }
.spoil-b__btn { position: absolute; left: 50%; top: 50%; height: 48px; padding: 0 22px; border: 2.5px solid var(--ink); border-radius: 14px; background: #fff; color: var(--ink); font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; transform: translate(-50%, -50%); transition: opacity .3s, transform .3s; }
.spoil-b__btn:hover { background: var(--gray-2); }
.spoil-b.open { background: none; overflow: visible; }
.spoil-b.open .spoil-b__in { filter: none; transform: none; opacity: 1; -webkit-user-select: auto; user-select: auto; }
.spoil-b.open .spoil-b__btn { opacity: 0; transform: translate(-50%, -50%) scale(.9); pointer-events: none; }
.spoil-b:not(.open) .spoil-b__in { min-height: 96px; }

/* 푸푸 한마디: 사이트의 말풍선과 같은 그림체 */
.psay { display: flex; gap: 12px; align-items: flex-start; margin-top: 1.6em !important; }
.psay .face--sm { flex: none; width: 44px; height: 44px; border-width: 2.5px; margin-top: 2px; }
.psay__bubble { position: relative; flex: 1; padding: 14px 18px; border: 2.5px solid var(--ink); border-radius: 18px; background: #fff; }
.psay__bubble::before, .psay__bubble::after { content: ""; position: absolute; top: 16px; border-style: solid; border-color: transparent; }
.psay__bubble::before { left: -13px; border-width: 8px 13px 8px 0; border-right-color: var(--ink); }
.psay__bubble::after { left: -8.5px; border-width: 6px 9px 6px 0; border-right-color: #fff; }
.psay__who { display: block; font-size: 14px; font-weight: 800; color: var(--text); }
.psay__bubble > * + * { margin-top: .5em; }
.memo { padding: 18px 22px; border-radius: 16px; background: var(--gray); font-size: 16px; }
.memo > * + * { margin-top: .6em; }

/* 사진·영상 */
.media { margin: 1.8em 0 !important; }
.media__zoom { display: block; width: 100%; padding: 0; border: 0; background: var(--gray); border-radius: 14px; overflow: hidden; cursor: zoom-in; }
.media img { display: block; width: 100%; height: auto; opacity: 0; transform: scale(1.02); transition: opacity .6s, transform .9s var(--out); }
.media img.ld { opacity: 1; transform: none; }
.media video { display: block; width: 100%; height: auto; border-radius: 14px; background: #000; }
.media figcaption { margin-top: 10px; font-size: 14px; line-height: 1.6; color: var(--muted); text-align: center; }
@media (min-width: 900px) { .media--wide { margin-left: -80px !important; margin-right: -80px !important; } }
.gallery { display: grid; gap: 8px; margin: 1.8em 0 !important; }
.gallery--2 { grid-template-columns: 1fr 1fr; }
.gallery--3 { grid-template-columns: repeat(3, 1fr); }
.gallery .media { margin: 0 !important; }
.gallery .media img, .gallery .media video { aspect-ratio: 1; object-fit: cover; }
.gallery figcaption { font-size: 13px; }
.zoom { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: max(16px, env(safe-area-inset-top)) 16px; background: rgba(10,10,10,0); cursor: zoom-out; transition: background .3s; }
.zoom.show { background: rgba(10,10,10,.92); }
.zoom img { max-width: 100%; max-height: 100%; border-radius: 6px; transform-origin: 0 0; transition: transform .45s var(--out); }

/* 표·키·취소선 */
.table { overflow-x: auto; margin: 1.6em 0 !important; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.6; }
.prose th { padding: 10px 12px; border-bottom: 1.5px solid var(--text); font-weight: 700; text-align: left; white-space: nowrap; color: var(--text); }
.prose td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose kbd { display: inline-block; min-width: 1.6em; padding: 1px 7px; border: 1px solid #d1d6db; border-bottom-width: 2.5px; border-radius: 7px; background: #fff; font: inherit; font-size: .82em; font-weight: 600; line-height: 1.6; text-align: center; color: var(--text); }
.prose .kplus { margin: 0 4px; color: var(--muted); font-size: .85em; }
.prose del { color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  .hl { transition: none; } .spoil.open { animation: none; }
  .spoil-b__in, .media img, .zoom, .zoom img { transition: none; }
}

/* 글 화면 오른쪽 아래 푸푸: 읽다 보면 먼저 말을 건다. 누르면 이 글을 아는 푸푸와 대화 */
.pfab { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 30; display: flex; align-items: flex-end; gap: 10px;
  transform: translateY(130%); transition: transform .5s cubic-bezier(.34,1.4,.64,1); pointer-events: none; }
.pfab.on { transform: none; pointer-events: auto; }
.pfab__btn { display: block; flex: none; border-radius: 50%; box-shadow: 0 6px 20px rgba(0,0,0,.14); transition: transform .2s; }
.pfab__btn:active { transform: scale(.94); }
.pfab__btn .face { width: 64px; height: 64px; border-width: 3px; }
.pfab__say {
  position: relative; margin-bottom: 30px; width: max-content; max-width: min(250px, calc(100vw - 110px));
  padding: 12px 16px; border: 2.5px solid var(--ink); border-radius: 18px; background: #fff; color: var(--ink);
  font: inherit; font-size: 15px; font-weight: 700; line-height: 1.45; text-align: left; cursor: pointer;
  opacity: 0; transform: translateY(8px) scale(.92); transform-origin: 100% 100%; pointer-events: none;
  transition: opacity .3s, transform .45s cubic-bezier(.34,1.56,.64,1);
}
.pfab__say::before, .pfab__say::after { content: ""; position: absolute; right: 18px; border-style: solid; border-color: transparent; }
.pfab__say::before { bottom: -14px; border-width: 14px 0 0 12px; border-top-color: var(--ink); }
.pfab__say::after { bottom: -9px; right: 21px; border-width: 9px 0 0 7px; border-top-color: #fff; }
.pfab__say.show { opacity: 1; transform: none; pointer-events: auto; }
.pfab__say:hover { background: var(--gray-2); }
.pfab__say:hover::after { border-top-color: var(--gray-2); }
.pfab__t:empty::before { content: "\00a0"; }
@media (prefers-reduced-motion: reduce) { .pfab, .pfab__say { transition: none; } }

/* 글 화면 안의 푸푸 대화 무대 — 메인 화면과 같은 모양: 푸푸가 아래 가운데 서고, 푸푸 말은 머리 위 말풍선 */
.pchat {
  --hs: min(40svh, 380px, 105vw * 470 / 400); --fh: 84px;
  position: fixed; inset: 0; z-index: 40; height: 100svh; background: #fff;
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
.pchat.open { opacity: 1; pointer-events: auto; }
body.pchat-on { overflow: hidden; }
body.pchat-on .pfab { opacity: 0; pointer-events: none; }
.pchat__x { position: absolute; top: calc(env(safe-area-inset-top) + 8px); right: 8px; z-index: 2; width: 48px; height: 48px; border: 0; border-radius: 14px; background: none; cursor: pointer; }
.pchat__x:hover { background: var(--gray); }
.pchat__x::before, .pchat__x::after { content: ""; position: absolute; left: 14px; right: 14px; top: 23px; height: 2.5px; border-radius: 2px; background: var(--ink); transform: rotate(45deg); }
.pchat__x::after { transform: rotate(-45deg); }
.pchat__chr {
  position: absolute; left: 50%; bottom: calc(var(--fh) - var(--hs) * .2); width: calc(var(--hs) * 400 / 470); height: var(--hs);
  transform: translate(-50%, 40%); transition: transform .55s cubic-bezier(.34,1.3,.64,1);
}
.pchat.open .pchat__chr { transform: translate(-50%, 0); }
.pchat__chr .chr { display: block; width: 100%; height: 100%; overflow: hidden; }
.pchat__log {
  position: absolute; left: 0; right: 0; top: calc(env(safe-area-inset-top) + 64px); bottom: calc(var(--fh) + var(--hs) * .651);
  display: flex; flex-direction: column; gap: 10px; overflow-y: auto; overscroll-behavior: contain;
  padding: 24px max(var(--pad), calc(50% - 290px)) 18px; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(transparent, #000 56px); mask-image: linear-gradient(transparent, #000 56px);
}
.pchat__log::-webkit-scrollbar { display: none; }
.pchat__log::before { content: ""; margin-top: auto; }
.pmsg { max-width: 86%; font-size: 16px; font-weight: 600; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; animation: pmsg-in .35s cubic-bezier(.22,1,.36,1) both; }
@keyframes pmsg-in { from { opacity: 0; transform: translateY(10px); } }
.pmsg--me { align-self: flex-end; padding: 10px 15px; border-radius: 18px; background: var(--ink); color: #fff; }
.pmsg--pupu { position: relative; align-self: flex-start; padding: 12px 16px; border: 2.5px solid var(--ink); border-radius: 18px; background: #fff; color: var(--ink); }
.pmsg--pupu.is-last { align-self: center; margin-bottom: 12px; }
.pmsg--pupu.is-last::before, .pmsg--pupu.is-last::after { content: ""; position: absolute; left: 50%; border-style: solid; border-color: transparent; }
.pmsg--pupu.is-last::before { bottom: -15px; margin-left: -10px; border-width: 15px 10px 0; border-top-color: var(--ink); }
.pmsg--pupu.is-last::after { bottom: -10px; margin-left: -7px; border-width: 11px 7px 0; border-top-color: #fff; }
.pmsg a { text-decoration: underline; text-underline-offset: 3px; }
.pdots { display: inline-flex; gap: 5px; padding: 6px 2px; }
.pdots i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink); animation: pdot 1s infinite; }
.pdots i:nth-child(2) { animation-delay: .15s; } .pdots i:nth-child(3) { animation-delay: .3s; }
@keyframes pdot { 0%, 100% { opacity: .2; } 40% { opacity: 1; } }
.pchat__form {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; display: flex; gap: 8px;
  padding: 14px max(var(--pad), calc(50% - 290px)) max(14px, env(safe-area-inset-bottom));
  background: #fff; border-top: 2.5px solid var(--ink);
}
.pchat__in { flex: 1; min-width: 0; height: 52px; padding: 0 18px; border: 2px solid var(--ink); border-radius: 16px; background: #fff; color: var(--ink); font: inherit; font-size: 16px; font-weight: 500; outline: none; }
.pchat__in::placeholder { color: var(--faint); }
.pchat__send { display: grid; place-items: center; width: 52px; height: 52px; flex: none; border: 0; border-radius: 16px; background: var(--ink); color: #fff; cursor: pointer; transition: opacity .2s, transform .15s; }
.pchat__send:disabled { opacity: .25; cursor: default; }
.pchat__send:active { transform: scale(.94); }
.pchat__send svg { width: 22px; height: 22px; }
@media (prefers-reduced-motion: reduce) { .pchat, .pchat__chr { transition: none; } .pmsg { animation: none; } .pdots i { animation: none; opacity: .7; } }

/* 댓글 */
.cmts { margin-top: 56px; padding-top: 28px; border-top: 1.5px solid var(--text); }
.cmts__h { font-size: 20px; font-weight: 800; letter-spacing: -0.03em; }
.cmts__n { margin-left: 4px; color: var(--muted); font-weight: 700; }
.cmts__form { display: grid; gap: 8px; margin-top: 16px; }
.cmts__name, .cmts__text { width: 100%; padding: 12px 14px; border: 2px solid var(--line); border-radius: 14px; background: #fff; color: var(--text); font: inherit; font-size: 16px; line-height: 1.6; outline: none; transition: border-color .15s; }
.cmts__name { max-width: 220px; }
.cmts__text { resize: vertical; min-height: 96px; }
.cmts__name:focus, .cmts__text:focus { border-color: var(--ink); }
.cmts__name::placeholder, .cmts__text::placeholder { color: var(--faint); }
.cmts__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cmts__note { font-size: 13px; line-height: 1.5; color: var(--muted); }
.cmts__note.bad { color: #d22030; font-weight: 600; }
.cmts__send { flex: none; height: 44px; padding: 0 20px; border: 0; border-radius: 14px; background: var(--ink); color: #fff; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.cmts__send:disabled { background: var(--faint); cursor: default; }
.cmts__list { margin-top: 24px; }
.cmts__empty { padding: 20px 0; font-size: 15px; color: var(--muted); }
.cmt { padding: 18px 0; border-top: 1px solid var(--line); }
.cmt__head { display: flex; align-items: baseline; gap: 8px; }
.cmt__name { font-size: 15px; font-weight: 700; }
.cmt__at { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cmt__del { margin-left: auto; padding: 4px 6px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.cmt__del:hover { color: var(--text); }
.cmt__text { margin-top: 6px; font-size: 15px; line-height: 1.7; color: var(--sub); white-space: pre-wrap; overflow-wrap: anywhere; }
.cmt--held .cmt__text { color: var(--muted); }
.cmt__held { margin-top: 6px; font-size: 13px; color: var(--muted); }
.cmt__reply { display: flex; gap: 10px; margin-top: 12px; padding-left: 14px; }
.cmt__reply .face--sm { flex: none; width: 34px; height: 34px; margin-top: 2px; }
.cmt__rbody { flex: 1; min-width: 0; padding: 10px 14px 12px; border: 2px solid var(--ink); border-radius: 4px 16px 16px 16px; background: #fff; }
.cmt__rbody .cmt__text { margin-top: 2px; color: var(--text); }
.cmt__rbody .pdots { margin-top: 4px; }
