/* 일상의 발견 (Marketing Magazine) — 한 권의 잡지가 스크롤을 따라다니는 매거진. 종이색 바탕 + 큰 세리프 + 기사마다 바뀌는 색 */
:root {
  --paper: #cdc6bb; --ink: #17140f; --dark: #14120f; --cream: #f1ece2; --accent: #345747; --ivory: #F8F6F1; --beige: #E8E1D5; --green: #345747;
  --serif: "Instrument Serif", "Noto Serif KR", serif; --sans: "Pretendard Variable", Pretendard, system-ui, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1); --gut: clamp(16px, 2.2vw, 36px);
  --bgc: #E8E1D5; --fg: var(--cream);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; overflow-x: clip; }
body { font-family: var(--sans); color: var(--fg); word-break: keep-all; -webkit-font-smoothing: antialiased; transition: color .5s; }
body[data-tone="light"] { --fg: var(--ink); }
a { color: inherit; text-decoration: none; }
.bg { position: absolute; left: 0; right: 0; top: 0; height: 100svh; min-height: 620px; background: var(--bgc); z-index: 0; transition: background 0.9s; }
/* 창으로 들어오는 빛 */
.light { position: absolute; left: 0; right: 0; top: 0; height: 100svh; opacity: .4; z-index: 1; pointer-events: none; opacity: var(--lightA, 0);
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.34) 44%, transparent 58%, rgba(255,255,255,.18) 70%, transparent 82%); }

.top { position: absolute; z-index: 30; inset: 0 0 auto; display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; padding: 14px var(--gut); font-size: 13px; }
.menu { display: flex; flex-direction: column; gap: 3px; opacity: .8; }
.brand { font-family: var(--serif); letter-spacing: .32em; font-size: 15px; padding-left: .32em; }
.write { justify-self: end; padding: 9px 16px; border-radius: 99px; background: var(--cream); color: var(--ink); font-weight: 600; }
.write:active { transform: scale(.97); }

/* ── 잡지 ── */
.stage { position: fixed; inset: 0; z-index: 5; display: grid; place-items: center; pointer-events: none; perspective: 1400px; }
.mag { --w: min(25vw, 37vh); position: relative; width: var(--w); aspect-ratio: 3 / 4; transform-style: preserve-3d; will-change: transform, opacity; }
.cover { position: absolute; inset: 0; border-radius: 2px 5px 5px 2px; padding: 9% 9% 8%; display: flex; flex-direction: column; color: var(--ink); overflow: hidden; backface-visibility: hidden;
  box-shadow: inset 5px 0 9px -5px rgba(0,0,0,.4), inset 0 0 0 1px rgba(0,0,0,.06); }
.cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(255,255,255,.22), transparent 30%, transparent 70%, rgba(0,0,0,.12)); }
.cover[data-cover="0"] { background: #ece5d8; }
.cover[data-cover="1"] { background: #dfe3c0; }
.cover[data-cover="2"] { background: #ecd66a; }
.cover[data-cover="3"] { background: #2a1c1c; color: #f1ece2; }
.c-no { font-size: calc(var(--w) * .045); letter-spacing: .08em; }
.c-title { font-family: var(--serif); font-weight: 400; font-size: calc(var(--w) * .3); line-height: .9; letter-spacing: -.02em; margin-top: 2%; }
.c-art { flex: 1; margin: 8% 0 6%; border-radius: 50% 50% 4px 4px / 38% 38% 4px 4px; background: radial-gradient(60% 50% at 50% 40%, #e7b33c, #b8731f 60%, #6a3a12); }
.cover[data-cover="1"] .c-art { background: radial-gradient(70% 60% at 40% 35%, #f3e9b4, #7d9a52 65%, #3d5a2c); }
.cover[data-cover="2"] .c-art { background: radial-gradient(60% 60% at 60% 40%, #f7f1d6, #c97b3a 60%, #7a3f1c); border-radius: 4px; }
.cover[data-cover="3"] .c-art { background: radial-gradient(60% 60% at 50% 45%, #e3b23c, #9a3b2e 62%, #3a1616); border-radius: 50%; }
.c-foot { font-size: calc(var(--w) * .04); letter-spacing: .12em; opacity: .7; }
.spine { position: absolute; left: 0; top: 0; bottom: 0; width: 16px; background: #b9b1a2; transform: rotateY(-90deg) translateZ(0); transform-origin: left; }
.pages { position: absolute; inset: 1% 0 1% 1%; background: repeating-linear-gradient(90deg, #f6f2ea 0 1px, #d8d1c4 1px 2px); transform: translateZ(-16px); box-shadow: 0 40px 60px -20px rgba(0,0,0,.45); }

/* ── 흐름 ── */
.flow { position: relative; z-index: 10; }
.ch { position: relative; height: calc(var(--h) * 1svh); }
.pin { position: sticky; top: 0; height: 100svh; padding: 64px var(--gut) 28px; overflow: clip; }
.display { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(54px, 9.6vw, 190px); line-height: .96; letter-spacing: -.035em; }
.display.sm { font-size: clamp(44px, 7vw, 130px); }
.ln { display: block; overflow: hidden; padding-bottom: .08em; }
.ln > span { display: block; transform: translateY(105%); transition: transform 1.1s var(--ease); }
.in .ln > span { transform: none; }
.in .ln + .ln > span { transition-delay: .09s; }
.hero .pin { display: flex; flex-direction: column; justify-content: flex-start; }
.hero .display { max-width: 46vw; margin-top: 2vh; }
.hero-sub { position: absolute; left: var(--gut); bottom: 30px; margin: 0; font-size: 14px; line-height: 1.6; opacity: .78; }
.hint { position: absolute; right: var(--gut); bottom: 30px; font-size: 12px; opacity: .6; }

.statement .pin { display: grid; place-items: center; }
.words { margin: 0; max-width: 17em; text-align: center; font-size: clamp(24px, 3.2vw, 54px); line-height: 1.22; letter-spacing: -.02em; font-weight: 500; }
.words span { opacity: .16; transition: opacity .35s; }
.words span.on { opacity: 1; }

/* 기사 */
.article .pin { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto 1fr; column-gap: 34vw; }
.article .display { grid-column: 1 / -1; white-space: nowrap; border-bottom: 1px solid color-mix(in srgb, currentColor 28%, transparent); padding-bottom: .04em; }
.article .display i { font-style: normal; margin-right: .18em; }
.a-left, .a-right { align-self: center; max-width: 30ch; opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease) .15s, transform .9s var(--ease) .15s; }
.in .a-left, .in .a-right { opacity: 1; transform: none; }
.a-tag { display: flex; align-items: center; gap: 8px; font-size: 12px; margin-bottom: 9vh; }
.a-tag::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.a-lead { margin: 0; font-size: clamp(17px, 1.5vw, 23px); line-height: 1.3; font-weight: 500; letter-spacing: -.02em; }
.a-right { justify-self: start; }
.a-right h3 { margin: 0 0 12px; font-size: clamp(18px, 1.6vw, 25px); font-weight: 500; letter-spacing: -.02em; }
.a-right p { margin: 0 0 18px; font-size: 13px; line-height: 1.6; opacity: .8; }
.a-link { display: inline-flex; gap: 8px; font-size: 13px; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.a-faces { display: flex; margin: 0 0 14px; padding: 0; list-style: none; }
.a-faces li, .face { display: grid; place-items: center; width: 30px; height: 30px; margin-right: -7px; border-radius: 50%; background: var(--ink); color: var(--cream); font-size: 13px; font-weight: 600; box-shadow: 0 0 0 2px var(--bgc); }

/* 독자 */
.readers .pin { display: flex; flex-direction: column; }
.readers-sub { margin: 14px 0 0; font-size: 14px; opacity: .75; }
.wall { list-style: none; margin: auto 0 4vh; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0 28px; max-width: 62vw; }
.wall li { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: center; padding: 14px 0; border-top: 1px solid color-mix(in srgb, currentColor 22%, transparent); }
.wall .face { width: 44px; height: 44px; margin: 0; font-size: 18px; box-shadow: none; }
.wall b { display: block; font-size: 15px; }
.wall div span { display: block; font-size: 12.5px; opacity: .72; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { font-size: 15px; opacity: .7; }

/* 펼쳐지는 판 */
.expand .pin { padding: 0; }
.panel { position: absolute; inset: 0; background: radial-gradient(90% 70% at 30% 20%, #4a5a33, #1f2a18 60%, #11160d); clip-path: inset(var(--ct, 18%) var(--cr, 30%) var(--cb, 18%) var(--cl, 30%)); display: grid; place-items: center; color: var(--cream); }
.panel-in { text-align: left; padding: 0 var(--gut); opacity: var(--po, 0); transform: translateY(calc((1 - var(--po, 0)) * 24px)); }
.panel .display span { display: block; }
.panel .display span + span { padding-left: 1.6em; }
.panel p { margin: 22px 0 0 2px; font-size: 14px; opacity: .8; }

/* 댓글 */
.comments { position: relative; padding: 12vh var(--gut) 10vh; max-width: 980px; }
.display.still { margin-bottom: 28px; }
.form { display: grid; gap: 14px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row.end { grid-template-columns: 1fr auto; align-items: center; }
label { display: grid; gap: 6px; font-size: 12.5px; opacity: .9; }
input, select, textarea { font: inherit; font-size: 16px; color: var(--ink); background: rgba(255,255,255,.5); border: 1px solid rgba(23,20,15,.25); border-radius: 6px; padding: 12px 13px; outline: none; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
button { font: inherit; font-weight: 600; padding: 13px 26px; border: 0; border-radius: 99px; background: var(--ink); color: var(--cream); cursor: pointer; transition: transform .12s; }
button:active { transform: scale(.97); }
button:disabled { opacity: .5; }
.msg { font-size: 13px; color: var(--accent); }
.list { list-style: none; margin: 34px 0 0; padding: 0; }
.list li { display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; padding: 18px 0; border-top: 1px solid rgba(23,20,15,.2); }
.list .face { width: 44px; height: 44px; margin: 0; font-size: 18px; box-shadow: none; }
.list b { font-size: 15px; } .list p { margin: 5px 0 0; font-size: 15px; line-height: 1.55; }
.list time, .list em { font-style: normal; font-size: 12px; opacity: .6; white-space: nowrap; }
.list li.new { animation: rise .7s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

.foot { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 30px; padding: 8vh var(--gut) 28px; border-top: 1px solid rgba(23,20,15,.2); }
.brand.big { font-size: clamp(60px, 13vw, 220px); letter-spacing: -.02em; padding: 0; font-weight: 400; line-height: .8; }
.foot nav { display: flex; flex-direction: column; gap: 4px; font-size: 20px; }
.foot small { grid-column: 1 / -1; font-size: 12px; opacity: .6; }

@media (max-width: 760px) {
  .mag { --w: min(46vw, 30vh); }
  .menu { display: none; } .top { grid-template-columns: auto 1fr; } .brand { padding: 9px 0; }
  .hero .display { max-width: none; }
  .hint { display: none; }
  .article .pin { grid-template-columns: 1fr; grid-template-rows: auto auto 1fr auto; column-gap: 0; }
  .article .display { white-space: normal; font-size: 13.5vw; }
  .a-tag { margin-bottom: 10px; } .a-left { margin-top: 12px; max-width: 22ch; }
  .a-right { align-self: end; grid-row: 4; max-width: none; } .a-right p { display: none; }
  .wall { max-width: none; grid-template-columns: 1fr; } .wall li:nth-child(n+5) { display: none; }
  .row { grid-template-columns: 1fr; } .foot { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .ln > span, .a-left, .a-right { transition: none; transform: none; opacity: 1; }
  .words span { opacity: 1; }
}

/* ── 스크롤 없는 첫 화면: 가운데 3D 잡지 ── */
.one { position: relative; height: 100svh; min-height: 620px; padding: 64px var(--gut) 28px; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto 1fr auto; column-gap: 34vw; overflow: clip; }
.one .display { grid-column: 1 / -1; white-space: nowrap; border-bottom: 1px solid color-mix(in srgb, currentColor 28%, transparent); }
.one .display i { font-style: normal; margin-right: .18em; }
.one .ln > span { transform: none; transition: transform .55s var(--ease), opacity .4s; }
.one .swap .ln > span { transform: translateY(105%); }
.one .stage { position: absolute; z-index: 2; pointer-events: auto; cursor: grab; }
.one .stage:active { cursor: grabbing; }
.one .a-left, .one .a-right { opacity: 1; transform: none; transition: opacity .4s; z-index: 3; }
.one.swap .a-left, .one.swap .a-right { opacity: 0; }
.back { position: absolute; inset: 0; background: #d9d2c5; border-radius: 5px 2px 2px 5px; transform: rotateY(180deg) translateZ(16px); backface-visibility: hidden; }
.cover { transition: opacity .01s; }
.dots { grid-column: 1 / -1; display: flex; justify-content: center; gap: 8px; z-index: 3; }
.dots button { width: 44px; height: 44px; padding: 0; background: none; color: inherit; display: grid; place-items: center; }
.dots button::before { content: ""; width: 26px; height: 3px; border-radius: 2px; background: currentColor; opacity: .3; transition: opacity .3s, width .3s; }
.dots button[aria-selected="true"]::before { opacity: 1; width: 40px; }
.readers { position: relative; padding: 12vh var(--gut) 0; color: var(--ink); }
.readers .wall { margin: 28px 0 0; max-width: none; }
body { background: #F8F6F1; }
.comments, .foot { color: var(--ink); }
@media (max-width: 760px) {
  .one { grid-template-columns: 1fr; grid-template-rows: auto auto 1fr auto auto; }
  .one .display { white-space: normal; font-size: 13.5vw; }
  .one .a-right { grid-row: 4; }
  .one .dots { grid-row: 5; }
}

/* ── 3D 서가 ── */
.bg, .light { position: fixed; height: auto; bottom: 0; }
.top { position: fixed; }
.tunnel { position: relative; height: calc(var(--n) * 85svh + 130svh); }
.tunnel .pin { padding: 0; perspective: 1100px; perspective-origin: 50% 46%; }
.world { position: absolute; inset: 0; transform-style: preserve-3d; will-change: transform; }
.card { position: absolute; left: 50%; top: 46%; width: min(30vw, 44vh); aspect-ratio: 3 / 4; margin: calc(min(30vw, 44vh) * -0.667) 0 0 calc(min(30vw, 44vh) * -0.5); padding: 8%; display: flex; flex-direction: column; color: var(--ink); border-radius: 3px; overflow: hidden; cursor: pointer; box-shadow: 0 50px 70px -30px rgba(0,0,0,.45); will-change: transform, opacity; }
.card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, rgba(255,255,255,.25), transparent 35%, transparent 70%, rgba(0,0,0,.14)); pointer-events: none; }
.card .k-no { font-size: 12px; letter-spacing: .1em; display: flex; justify-content: space-between; }
.card b { font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 5.4vw, 96px); line-height: .92; letter-spacing: -.03em; margin-top: 4%; }
.card i { flex: 1; margin: 8% 0 0; border-radius: var(--r, 50% 50% 4px 4px / 38% 38% 4px 4px); background: var(--art); }
.card.dark { color: var(--cream); }
.info { position: absolute; left: var(--gut); bottom: 30px; max-width: min(46vw, 620px); z-index: 4; transition: opacity .35s; }
.info.swap { opacity: 0; }
.info .display { font-size: clamp(40px, 6.2vw, 120px); }
.info .ln > span { transform: none; }
.i-cat { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 10px; }
.i-cat::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.i-sum { margin: 14px 0 16px; font-size: 15px; line-height: 1.6; max-width: 38ch; opacity: .85; }
.count { position: absolute; right: var(--gut); bottom: 30px; font-family: var(--serif); font-size: clamp(28px, 3vw, 54px); z-index: 4; }
.count small { font-size: .5em; opacity: .6; }
.cats { position: absolute; right: var(--gut); top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 2px; z-index: 4; }
.cats button { background: none; color: inherit; padding: 8px 0; min-height: 44px; font-size: 13px; font-weight: 500; text-align: right; opacity: .45; border-radius: 0; }
.cats button[aria-pressed="true"] { opacity: 1; }
.finale { position: absolute; inset: 0; background: rgba(20, 18, 15, calc(var(--fo, 0) * .62)); display: grid; place-items: center; color: var(--cream); opacity: var(--fo, 0); pointer-events: none; z-index: 5; }
.finale .display span { display: block; } .finale .display span + span { padding-left: 1.5em; }
@media (max-width: 760px) {
  .card { width: 58vw; margin: -39vw 0 0 -29vw; top: 40%; }
  .info { max-width: none; right: var(--gut); bottom: 22px; } .i-sum { display: none; }
  .count { top: 64px; bottom: auto; } .cats { display: none; }
}

/* ── 아래쪽: 왼쪽 제목 · 오른쪽 내용 두 칸 ── */
.block { position: relative; max-width: 1180px; margin: 0 auto; padding: 120px var(--gut) 40px; display: grid; grid-template-columns: minmax(240px, 5fr) 7fr; gap: 24px 64px; color: var(--ink); }
.block + .block { padding-top: 90px; border-top: 0; }
.b-head { position: sticky; top: 96px; align-self: start; }
.b-no { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }
.b-no::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.b-title { margin: 14px 0 16px; font-family: var(--serif); font-weight: 400; font-size: clamp(38px, 4.6vw, 68px); line-height: 1.02; letter-spacing: -.03em; }
.b-head p { margin: 0; font-size: 15px; line-height: 1.6; color: #5b554c; max-width: 26ch; }
.block .ln > span { transform: translateY(105%); }
.block.in .ln > span { transform: none; }
.block .wall { margin: 0; max-width: none; grid-template-columns: 1fr 1fr; gap: 0 32px; align-content: start; }
.block .wall li, .block .list li { border-color: rgba(23, 20, 15, .16); }
.block .wall li { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--i, 0) * 60ms); }
.block.in .wall li { opacity: 1; transform: none; }
.wall .empty { grid-column: 1 / -1; padding: 28px 26px !important; border: 1px dashed rgba(23, 20, 15, .3) !important; border-radius: 14px; font-size: 16px; line-height: 1.6; opacity: 1 !important; }
.comments.block { padding-bottom: 110px; max-width: 1180px; }
.b-body { min-width: 0; }
.form { padding: 26px; border-radius: 18px; background: rgba(255, 255, 255, .42); }
.form input, .form select, .form textarea { background: #f4f0e8; border-color: transparent; border-radius: 10px; }
.list { margin-top: 18px; }
.list li:first-child { border-top: 0; }
.foot { max-width: 1180px; margin: 0 auto; }
/* 서가를 지나면 머리줄에 종이 바탕 */
.top { transition: background .4s, color .4s; }
body[data-past="1"] .top { background: rgba(211, 205, 195, .88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: var(--ink); }
.menu { flex-direction: row; gap: 18px; }
/* 책을 크게 */
.card { width: min(36vw, 60vh); margin: calc(min(36vw, 60vh) * -0.667) 0 0 calc(min(36vw, 60vh) * -0.5); top: 45%; }
.card b { font-size: clamp(34px, 6.6vw, 124px); }
.info .ln { overflow: hidden; }
.info .ln > span { transition: transform .5s var(--ease); }
.info.swap { opacity: 1; }
.info.swap .ln > span { transform: translateY(105%); }
.info .i-cat, .info .i-sum, .info .a-link { transition: opacity .3s; }
.info.swap .i-cat, .info.swap .i-sum, .info.swap .a-link { opacity: 0; }
@media (max-width: 760px) {
  .block { grid-template-columns: 1fr; padding-top: 90px; }
  .b-head { position: static; }
  .block .wall { grid-template-columns: 1fr; }
  .card { width: 68vw; margin: -45vw 0 0 -34vw; top: 41%; }
  .form { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) { .block .ln > span, .block .wall li { transform: none; opacity: 1; transition: none; } }

/* ── 일상의 발견: 매거진 영역 (아이보리·짙은 초록·실제 사진) ── */
.brand.ko { font-family: "Noto Serif KR", var(--serif); letter-spacing: .12em; font-size: 16px; padding-left: .12em; }
.mag-lead, .mag-latest, .mag-cats, .mag-about { color: #252923; }
.tag { display: inline-block; font-size: 12px; letter-spacing: .04em; color: var(--green); font-weight: 600; }
.ad { font-style: normal; font-size: 11px; font-weight: 500; color: #7a6f5c; border: 1px solid #cfc5b4; border-radius: 99px; padding: 0 7px; margin-left: 4px; }
.lead { display: grid; gap: 18px; }
.lead-img { display: block; aspect-ratio: 16 / 10; border-radius: 6px; background: #e8e1d5 center / cover; transition: transform 1s var(--ease); }
.lead-img:hover { transform: scale(1.01); }
.lead-txt h3 { margin: 8px 0 8px; font-family: "Noto Serif KR", var(--serif); font-weight: 600; font-size: clamp(26px, 3vw, 40px); line-height: 1.25; letter-spacing: -.02em; }
.lead-txt p { margin: 0 0 10px; font-size: 16px; line-height: 1.7; color: #4a4f46; max-width: 52ch; }
.lead-txt small { font-size: 13px; color: #7d7a72; }
.latest { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 34px 26px; align-content: start; }
.latest a { display: grid; gap: 7px; }
.latest .ph { aspect-ratio: 4 / 3; border-radius: 4px; background: #e8e1d5 center / cover; transition: transform .6s var(--ease); }
.latest a:hover .ph { transform: translateY(-3px); }
.latest b { font-family: "Noto Serif KR", var(--serif); font-weight: 600; font-size: 19px; line-height: 1.35; }
.latest .sm { font-size: 14px; line-height: 1.6; color: #5b5f56; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.block .latest li { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
.block.in .latest li { opacity: 1; transform: none; }
.catlist { list-style: none; margin: 0; padding: 0; align-content: start; }
.catlist li { display: flex; justify-content: space-between; align-items: baseline; padding: 18px 0; border-top: 1px solid rgba(37, 41, 35, .16); }
.catlist b { font-family: "Noto Serif KR", var(--serif); font-weight: 400; font-size: clamp(24px, 3vw, 40px); letter-spacing: -.02em; }
.catlist span { font-size: 13px; color: var(--green); }
.about-grid { display: grid; gap: 22px; align-content: start; }
.editor { display: grid; grid-template-columns: 56px 1fr; gap: 16px; padding: 22px; background: var(--beige); border-radius: 14px; }
.editor .face { width: 56px; height: 56px; margin: 0; background: var(--green); color: var(--ivory); }
.editor p, .contact p { margin: 6px 0 0; font-size: 15px; line-height: 1.7; color: #4a4f46; }
.contact { padding: 22px; border: 1px solid rgba(37, 41, 35, .16); border-radius: 14px; }
.pill { display: inline-block; margin-top: 12px; padding: 10px 18px; border-radius: 99px; background: #252923; color: var(--ivory); font-weight: 600; font-size: 14px; }
.wordmark { display: grid; gap: 14px; }
.wm-sub { font-size: 13px; color: #5b5f56; letter-spacing: .02em; }
.foot .brand.big { font-size: clamp(56px, 11vw, 190px); line-height: .86; }
@media (max-width: 760px) { .latest { grid-template-columns: 1fr 1fr; gap: 24px 14px; } .latest b { font-size: 16px; } .editor { grid-template-columns: 44px 1fr; } .editor .face { width: 44px; height: 44px; } }

/* ── 일상의 발견: 아이보리 · 짙은 초록 · 실제 사진 ── */
:root { --paper: #F8F6F1; --ink: #252923; --cream: #F8F6F1; --accent: #345747; --beige: #E8E1D5; }
body { background: var(--paper); }
.top { grid-template-columns: auto 1fr auto; align-items: center; gap: 28px; padding: 12px var(--gut); }
.brand { letter-spacing: 0; padding: 0; display: flex; align-items: baseline; gap: 10px; }
.brand b { font-family: var(--serif); font-weight: 600; font-size: 21px; letter-spacing: -.03em; }
.brand small { font-size: 10px; letter-spacing: .18em; opacity: .65; }
.menu { justify-content: center; gap: 22px; font-size: 14px; opacity: 1; }
.menu a { padding: 10px 0; opacity: .75; } .menu a:hover { opacity: 1; }
.write { background: var(--accent); color: #fff; }
body[data-past="1"] .top { background: rgba(248, 246, 241, .9); }
.readers.block, .comments.block, .foot { color: var(--ink); }
.b-no::before { background: var(--accent); }
button { background: var(--accent); }
.face, .a-faces li { background: var(--accent); color: #fff; }
.form { background: var(--beige); } .form input, .form select, .form textarea { background: var(--paper); }
/* 표지 = 사진 한 장 + 아래 흰 띠 */
.card { padding: 0; background: var(--paper) !important; border-radius: 4px; }
.card img { flex: 1; min-height: 0; width: 100%; object-fit: cover; display: block; }
.card .k-no { padding: 12px 14px 13px; font-size: 13px; letter-spacing: 0; color: var(--ink); align-items: baseline; }
.card .k-no b { font-family: var(--sans); font-size: 13px; font-weight: 600; margin: 0; letter-spacing: 0; line-height: 1.2; color: var(--accent); }
.card::after { background: linear-gradient(105deg, rgba(255,255,255,.14), transparent 30%); }
.finale { background: rgba(37, 41, 35, calc(var(--fo, 0) * .5)); }
.ad { display: inline-block; margin-left: 8px; padding: 2px 7px; border-radius: 4px; background: var(--beige); color: #5b554c; font-size: 11px; font-weight: 600; vertical-align: 2px; }
/* 대표 기사 */
.feature, .latest { position: relative; max-width: 1180px; margin: 0 auto; padding: 110px var(--gut) 0; color: var(--ink); }
.feature a { display: grid; grid-template-columns: 7fr 5fr; gap: 44px; align-items: end; }
.feature figure { margin: 0; overflow: hidden; border-radius: 6px; aspect-ratio: 16 / 10; }
.feature img, .g-card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1.2s var(--ease); }
.feature a:hover img, .g-card:hover img { transform: scale(1.04); }
.feature figure { clip-path: inset(0 0 100% 0); transition: clip-path 1.1s var(--ease); }
.feature.in figure { clip-path: inset(0); }
.f-cat, .g-cat { font-size: 13px; font-weight: 600; color: var(--accent); }
.feature h2 { margin: 12px 0 14px; font-family: var(--serif); font-weight: 600; font-size: clamp(30px, 3.6vw, 52px); line-height: 1.16; letter-spacing: -.035em; }
.feature p { margin: 0 0 18px; font-size: 16px; line-height: 1.65; color: #4d5249; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meta { font-size: 13px; color: #7a7d74; }
/* 최신 발견 */
.l-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.l-head .b-title { margin: 0; }
.latest .ln > span { transform: translateY(105%); } .latest.in .ln > span { transform: none; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips button { background: none; color: var(--ink); padding: 0 14px; min-height: 44px; font-size: 14px; font-weight: 500; border-radius: 99px; box-shadow: inset 0 0 0 1px rgba(37, 41, 35, .18); }
.chips button[aria-selected="true"] { background: var(--accent); color: #fff; box-shadow: none; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 44px 28px; }
.g-card { display: block; opacity: 0; transform: translateY(20px); transition: opacity .7s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
.latest.in .g-card { opacity: 1; transform: none; }
.g-card figure { margin: 0 0 14px; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 6px; background: var(--beige); }
.g-card h3 { margin: 6px 0 8px; font-size: 20px; line-height: 1.32; letter-spacing: -.03em; font-weight: 650; }
.g-card p { margin: 0 0 10px; font-size: 14.5px; line-height: 1.6; color: #4d5249; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.g-empty { grid-column: 1 / -1; padding: 40px 0; color: #7a7d74; }
/* 하단 */
.foot { display: block; max-width: none; margin: 110px 0 0; padding: 64px var(--gut) 26px; background: var(--accent); color: #F8F6F1 !important; border: 0; overflow: hidden; }
.f-cols { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 1.3fr 1fr 1fr auto; gap: 40px; }
.f-cols h3 { margin: 0 0 10px; font-size: 15px; } .f-cols p { margin: 0 0 10px; font-size: 14px; line-height: 1.65; opacity: .82; }
.f-cols a { font-size: 14px; } .foot nav { font-size: 14px; gap: 2px; } .foot nav a { padding: 6px 0; opacity: .85; }
.word { display: block; margin: 70px 0 0; font-family: "Instrument Serif", serif; font-weight: 400; font-size: 13.6vw; line-height: .82; letter-spacing: -.035em; white-space: nowrap; text-align: center; }
.f-end { max-width: 1180px; margin: 22px auto 0; display: flex; justify-content: space-between; gap: 20px; align-items: baseline; flex-wrap: wrap; }
.f-end span { font-size: 13px; letter-spacing: .22em; } .f-end small { grid-column: auto; font-size: 12px; opacity: .65; }
@media (max-width: 760px) {
  .menu { display: none; } .brand small { display: none; }
  .feature a { grid-template-columns: 1fr; gap: 18px; } .feature, .latest { padding-top: 80px; }
  .grid { grid-template-columns: 1fr; gap: 34px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(var(--gut) * -1); padding: 0 var(--gut); scrollbar-width: none; } .chips button { flex: none; }
  .f-cols { grid-template-columns: 1fr; gap: 26px; } .word { margin-top: 44px; }
}
@media (prefers-reduced-motion: reduce) { .g-card, .feature figure { opacity: 1; transform: none; clip-path: none; transition: none; } }

/* 기사 제목이 길어져서 서가의 제목 크기를 줄인다 */
.info { max-width: min(40vw, 560px); }
.info .display { font-family: var(--serif); font-weight: 600; font-size: clamp(28px, 3.4vw, 56px); line-height: 1.14; letter-spacing: -.035em; }
@media (max-width: 760px) { .info { max-width: none; } .info .display { font-size: 26px; } }

/* ── 카테고리 페이지 ── */
.menu a[aria-current="page"] { opacity: 1; font-weight: 600; box-shadow: 0 2px 0 var(--accent); }
.cat-page { color: var(--ink); --fg: var(--ink); }
.cat-main { max-width: 1180px; margin: 0 auto; padding: 150px var(--gut) 120px; }
.cat-head { margin-bottom: 56px; }
.back { display: inline-block; padding: 10px 0; font-size: 14px; color: #6b6f64; }
.cat-head .display { font-size: clamp(52px, 8.4vw, 132px); margin: 8px 0 14px; }
.cat-page .ln > span { transform: translateY(105%); }
.cat-page.in .ln > span { transform: none; }
.cat-head p { margin: 0; font-size: 16px; color: #5b5f55; }
.cat-page.in .g-card { opacity: 1; transform: none; transition-delay: calc(.25s + var(--i, 0) * 80ms); }
.cat-page .g-card figure { clip-path: inset(0 0 100% 0); transition: clip-path 1s var(--ease); transition-delay: calc(.25s + var(--i, 0) * 80ms); }
.cat-page.in .g-card figure { clip-path: inset(0); }

/* ── 하단: 베이지 바탕 + 한 자씩 닦이듯 나타나는 큰 글자 ── */
.foot2 { position: relative; background: var(--beige); color: #23362b; padding: 72px var(--gut) 18px; overflow: hidden; }
.f2-top { display: grid; grid-template-columns: 1fr 1fr 3fr 3fr; gap: 24px; align-items: start; }
.f2-links { display: flex; flex-direction: column; font-size: 14px; }
.f2-links a { padding: 5px 0; } .f2-links a:hover { text-decoration: underline; text-underline-offset: 3px; }
.f2-cta { grid-column: 4; }
.f2-cta p { margin: 0 0 18px; font-size: clamp(17px, 1.5vw, 22px); line-height: 1.45; letter-spacing: -.02em; font-weight: 500; }
.f2-btn { display: inline-flex; gap: 12px; align-items: center; padding: 13px 22px; background: #23362b; color: var(--paper); font-size: 14px; font-weight: 600; border-radius: 4px; }
.f2-btn span { transition: transform .3s var(--ease); } .f2-btn:hover span { transform: translateX(5px); }
.f2-btn:active { transform: scale(.97); }
.f2-word { margin: 9vw 0 0; line-height: .78; }
.f2-word small { display: block; font-family: "Instrument Serif", serif; font-size: 4.2vw; letter-spacing: -.02em; margin: 0 0 .1em .4vw; opacity: 0; transition: opacity .8s .1s; }
.f2-word.in small { opacity: 1; }
.f2-word b { display: flex; justify-content: space-between; font-family: "Instrument Serif", serif; font-weight: 400; font-size: 23.4vw; letter-spacing: -.04em; padding-bottom: .12em; }
.f2-word i { font-style: normal; display: block; clip-path: inset(0 100% 0 0); transform: translateY(.12em); transition: clip-path 1.1s var(--ease), transform 1.3s var(--ease); transition-delay: calc(var(--i) * 85ms); }
.f2-word.in i { clip-path: inset(-10% -10% -10% -10%); transform: none; }
.f2-end { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 12px; margin-top: 10px; }
.f2-end a { margin-right: 14px; } .f2-end span:nth-child(2) { letter-spacing: .2em; }
@media (max-width: 760px) { .f2-top { grid-template-columns: 1fr 1fr; } .f2-cta { grid-column: 1 / -1; } .cat-main { padding-top: 110px; } }
@media (prefers-reduced-motion: reduce) { .f2-word i, .f2-word small, .cat-page .g-card figure { clip-path: none; transform: none; opacity: 1; transition: none; } }

/* 표지가 위쪽 메뉴와 겹치지 않게 조금 내리고, 높이에 맞춰 살짝 줄인다 */
.tunnel .pin { perspective-origin: 50% 54%; }
.card { top: 54%; width: min(34vw, 54vh); margin: calc(min(34vw, 54vh) * -0.667) 0 0 calc(min(34vw, 54vh) * -0.5); }
@media (max-width: 760px) { .card { top: 44%; width: 64vw; margin: -42.7vw 0 0 -32vw; } }
/* 나갈 때는 빨리 접힌다(다음에 들어올 때 처음부터 다시 보이게) */
.f2-word:not(.in) i { transition-duration: .25s; transition-delay: 0s; }
.f2-word:not(.in) small { transition-duration: .2s; transition-delay: 0s; }

/* ── 기사 읽기: 사진이 왼쪽으로 날아가 펼쳐지고 글이 오른쪽에 올라온다 ── */
.reader { position: fixed; inset: 0; z-index: 100; color: var(--ink); }
.reader[hidden] { display: none; }
.r-strips { position: absolute; inset: 0; display: flex; }
.r-strips i { flex: 1; background: var(--paper); transform: scaleX(0); transform-origin: right; transition: transform .55s var(--ease); margin-right: -1px; }
.r-strips i:nth-child(1) { transition-delay: .16s; } .r-strips i:nth-child(2) { transition-delay: .12s; } .r-strips i:nth-child(3) { transition-delay: .08s; } .r-strips i:nth-child(4) { transition-delay: .04s; }
.reader.on .r-strips i { transform: none; }
.r-photo { position: absolute; left: 0; top: 0; width: 46vw; height: 100%; overflow: hidden; transform-origin: 0 0; transition: transform .85s var(--ease); will-change: transform; }
.r-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1.12); transition: transform 1.6s var(--ease); }
.reader.on .r-photo img { transform: none; }
.r-body { position: absolute; left: 46vw; right: 0; top: 0; bottom: 0; overflow-y: auto; overscroll-behavior: contain; padding: 28px clamp(24px, 5vw, 80px) 80px; }
.r-close { position: sticky; top: 0; float: right; z-index: 2; background: var(--beige); color: var(--ink); padding: 0 18px; min-height: 44px; font-size: 14px; opacity: 0; transition: opacity .4s .5s; }
.reader.on .r-close { opacity: 1; }
.r-in { max-width: 34em; padding-top: 14vh; clear: both; }
.r-in > * { opacity: 0; transform: translateX(46px); transition: opacity .7s var(--ease), transform .9s var(--ease); transition-delay: calc(.38s + var(--i, 0) * 55ms); }
.reader.on .r-in > * { opacity: 1; transform: none; }
.reader:not(.on) .r-in > * { transition-duration: .2s; transition-delay: 0s; }
.r-cat { display: block; font-size: 14px; font-weight: 600; color: var(--accent); }
.r-in h1 { margin: 14px 0 18px; font-family: var(--serif); font-weight: 600; font-size: clamp(30px, 3.3vw, 50px); line-height: 1.18; letter-spacing: -.035em; }
.r-sum { margin: 0 0 14px; font-size: 18px; line-height: 1.65; color: #4d5249; }
.r-meta { margin: 0 0 36px; padding-bottom: 22px; border-bottom: 1px solid rgba(37, 41, 35, .16); font-size: 13px; color: #7a7d74; }
.r-in h2 { margin: 34px 0 10px; font-size: 21px; letter-spacing: -.03em; }
.r-in p { margin: 0 0 14px; font-size: 17px; line-height: 1.8; }
.r-tags { margin-top: 30px !important; } .r-tags span { margin-right: 10px; font-size: 14px; color: var(--accent); }
.r-go { display: inline-block; margin-top: 18px; padding: 14px 22px; border-radius: 4px; background: var(--accent); color: #fff; font-size: 15px; font-weight: 600; }
@media (max-width: 760px) {
  .r-photo { width: 100%; height: 38svh; }
  .r-body { left: 0; top: 38svh; padding: 14px 20px 70px; }
  .r-in { padding-top: 12px; } .r-in > * { transform: translateY(26px); }
  .r-close { position: fixed; top: 12px; right: 12px; }
}
@media (prefers-reduced-motion: reduce) { .r-strips i, .r-photo, .r-photo img, .r-in > * { transition: none; transform: none; opacity: 1; } }

/* ── 휴대폰 규격(360~440 폭, 640~956 높이) 맞춤 ── */
.form, .row, .row > label, .b-body, .block > * { min-width: 0; }
.form input, .form select, .form textarea { width: 100%; min-width: 0; }
.brand, .write { min-height: 44px; display: inline-flex; align-items: center; }
.info .a-link { min-height: 44px; align-items: center; }
@media (max-width: 760px) {
  .block { padding-left: 16px; padding-right: 16px; }
  .top { padding-top: max(6px, env(safe-area-inset-top)); }
}
/* 키가 작은 화면(갤럭시 S5~S7 360×640 등): 표지를 줄이고 글 칸을 지킨다 */
@media (max-width: 760px) and (max-height: 700px) {
  .card { width: 50vw; margin: -33.4vw 0 0 -25vw; top: 40%; }
  .info .display { font-size: 22px; }
}

/* 휴대폰: 아래 기사 글을 조금 올린다(홈 막대 · 주소창에 붙지 않게) */
@media (max-width: 760px) { .info { bottom: calc(34px + env(safe-area-inset-bottom)); } }

/* ── 첫 화면 회전목마: 표지가 둥글게 놓여 있고 고리가 저절로 돈다(화면 한 장, 스크롤과 상관없다). 지나간 표지는 뒤쪽에 작게 남는다 ── */
.tunnel { height: 100svh; min-height: 600px; }
.stage { position: absolute; inset: 0; perspective: 1100px; perspective-origin: 62% 60%; }
.tunnel .pin { height: 100%; padding: 0; touch-action: pan-y; -webkit-user-select: none; user-select: none; cursor: grab; }
.ring { --cw: min(27vw, 45vh); position: absolute; left: 62%; top: 60%; width: 0; height: 0; transform-style: preserve-3d; }
.cv { position: absolute; left: calc(var(--cw) / -2); top: calc(var(--cw) * -.667); width: var(--cw); aspect-ratio: 3 / 4; display: flex; flex-direction: column; overflow: hidden; border-radius: 5px; background: var(--paper); color: var(--ink); box-shadow: 0 24px 40px -22px rgba(0, 0, 0, .5); will-change: transform; backface-visibility: hidden; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
.cv img { flex: 1; min-height: 0; width: 100%; object-fit: cover; display: block; }
.cv-tag { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 11px 14px 12px; font-size: 13px; }
.cv-tag b { font-weight: 600; color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 멀리 있는 표지는 바탕색 안개에 잠긴다 */
.cv::after { content: ""; position: absolute; inset: 0; background: var(--bgc); opacity: var(--fog, 0); transition: background .9s; pointer-events: none; }
.info .i-cat { font-variant-numeric: tabular-nums; }
.info .display { font-size: clamp(34px, 4.6vw, 76px); }
.catlist li { display: block; padding: 0; }
.catlist a { display: flex; justify-content: space-between; align-items: baseline; padding: 18px 0; }
.catlist a:hover b { color: var(--accent); }
@media (max-width: 760px) {
  .ring { --cw: 66vw; left: 50%; top: 47%; }
  .info { right: 16px; bottom: calc(84px + env(safe-area-inset-bottom)); }
  .info .display { font-size: 30px; } .i-sum { display: block; margin: 8px 0 4px; font-size: 14px; }
  .info { bottom: calc(22px + env(safe-area-inset-bottom)); }
}
@media (max-width: 760px) and (max-height: 700px) { .ring { --cw: 52vw; top: 45%; } .i-sum { display: none; } .info .display { font-size: 24px; } }
/* ── 글 신청 폼 · 기사 안 댓글 ── */
.apply.block { padding-bottom: 110px; }
.agree { display: flex; grid-template-columns: none; align-items: flex-start; gap: 10px; font-size: 13.5px; line-height: 1.5; }
.form .agree input { width: 20px; height: 20px; flex: none; margin: 0; padding: 0; accent-color: var(--accent); }
.r-cm { margin-top: 44px; padding-top: 8px; border-top: 1px solid rgba(37, 41, 35, .16); }
.r-cm h2 small { font-size: .8em; color: var(--accent); margin-left: 4px; }
.r-cm .list { margin: 8px 0 22px; }
.r-cm .list li { grid-template-columns: 40px 1fr auto; padding: 16px 0; border-color: rgba(37, 41, 35, .14); }
.r-cm .list .face { width: 40px; height: 40px; font-size: 16px; }
.r-cm .list p { margin: 4px 0 0; font-size: 15px; line-height: 1.6; }
.r-cm .list .empty { display: block; border: 0; color: #7a7d74; font-size: 15px; opacity: 1; }
.r-cm .form { padding: 20px; }
@media (max-width: 760px) { .r-cm .form { padding: 16px; } }


/* 최신 발견 목록이 오른쪽 칸을 넘쳐 잘리던 것: 옛 규칙(.feature, .latest)의 가운데 정렬·여백을 끈다 */
.block .latest { max-width: none; margin: 0; padding: 0; }

/* ── 휴대폰: 머리줄 단추를 오른쪽 끝으로, 하단을 한 줄기로 정리 ── */
.f2-links b { font-size: 12px; font-weight: 600; letter-spacing: .04em; opacity: .6; margin-bottom: 6px; }
@media (max-width: 760px) {
  .top { grid-template-columns: 1fr auto; gap: 12px; padding-left: 16px; padding-right: 16px; }
  .write { min-height: 40px; padding: 0 15px; font-size: 13.5px; }
  .apply.block { padding-bottom: 64px; }
  .foot2 { padding: 44px 16px calc(20px + env(safe-area-inset-bottom)); }
  .f2-top { grid-template-columns: 1fr 1fr; gap: 26px 16px; }
  .f2-cta { grid-column: 1 / -1; grid-row: 1; padding-bottom: 26px; border-bottom: 1px solid rgba(35, 54, 43, .18); }
  .f2-cta p { margin-bottom: 16px; font-size: 18px; line-height: 1.5; }
  .f2-btn { display: flex; justify-content: space-between; min-height: 50px; padding: 0 20px; border-radius: 8px; font-size: 15px; }
  .f2-links { font-size: 15px; }
  .f2-links a { padding: 10px 0; }
  .f2-word { margin-top: 36px; }
  .f2-word small { font-size: 6vw; }
  .f2-word b { font-size: 22vw; }
  .f2-end { flex-direction: column; gap: 4px; margin-top: 14px; padding-top: 16px; border-top: 1px solid rgba(35, 54, 43, .18); }
  .f2-end span:nth-child(1) a { display: inline-block; padding: 8px 0; margin-right: 18px; font-size: 13px; }
  .f2-end span:nth-child(2) { font-size: 11px; opacity: .7; }
  .f2-end span:nth-child(3) { opacity: .7; }
}

/* ── 회전목마 아래 글: 번호 + 갈래 수만큼의 줄(지금 것은 길고 진하다) · 큰 제목 · 알약 단추 ── */
body { --inv: #F8F6F1; } body[data-tone="dark"] { --inv: #252923; }
.i-top { display: flex; align-items: center; gap: 14px; }
.i-no { font-family: var(--serif); font-size: 24px; line-height: 1; font-variant-numeric: tabular-nums; min-width: 1.2em; }
.segs { display: flex; gap: 6px; }
.segs button { position: relative; width: 20px; height: 44px; padding: 0; border-radius: 0; background: none; color: inherit; transition: width .6s var(--ease); }
.segs button:active { transform: none; }
.segs button::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; border-radius: 2px; background: currentColor; opacity: .25; transition: opacity .4s; }
.segs button[aria-current="true"] { width: 56px; }
.segs button[aria-current="true"]::before { opacity: 1; }
.info .display { font-size: clamp(40px, 5vw, 84px); line-height: 1.08; }
.info .i-sum { margin: 12px 0 0; }
.info .i-no { transition: opacity .25s; } .info.swap .i-no { opacity: 0; }
.i-go { display: inline-flex; align-items: center; gap: 14px; margin-top: 22px; min-height: 54px; padding: 0 8px 0 24px; border-radius: 99px; background: var(--fg); color: var(--inv); font-size: 15px; font-weight: 600; transition: background .5s, color .5s, transform .12s; }
.i-go i { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--inv); color: var(--fg); font-style: normal; font-size: 17px; transition: transform .35s var(--ease), background .5s, color .5s; }
.i-go:active { transform: scale(.97); }
@media (hover: hover) { .i-go:hover i { transform: translateX(4px); } }
@media (max-width: 760px) {
  .info .display { font-size: 38px; } .info .i-sum { margin: 8px 0 0; font-size: 14.5px; }
  .i-go { margin-top: 18px; }
}
@media (max-width: 760px) and (max-height: 700px) { .info .display { font-size: 28px; } .i-go { margin-top: 12px; min-height: 48px; } .i-go i { width: 34px; height: 34px; } }

/* ── 휴대폰 첫 화면: 머리줄 · 회전목마 · 글을 위에서 아래로 차례로 놓는다(겹치지 않게). 상태줄까지 바탕색을 채운다 ── */
html, body { background: var(--bgc); }
@media (max-width: 760px) {
  .tunnel .pin { display: flex; flex-direction: column; padding: calc(74px + env(safe-area-inset-top)) 0 calc(18px + env(safe-area-inset-bottom)); }
  .stage { position: relative; inset: auto; flex: 1; min-height: 0; perspective: 900px; }
  .info { position: static; display: flex; flex-direction: column; max-width: none; padding: 0 16px; margin-top: 6px; }
  .i-go { align-self: flex-end; margin-top: 14px; }
}
@media (max-width: 760px) and (max-height: 620px) { .i-go { margin-top: 10px; } }


/* ── 머리줄: 떠 있는 알약 띠. 뒤가 비쳐 흐려지고, 바탕이 어두워지면 같이 뒤집힌다 ── */
.top, body[data-past="1"] .top { position: fixed; inset: calc(8px + env(safe-area-inset-top)) auto auto 50%; transform: translateX(-50%); width: min(1180px, calc(100% - 24px)); height: 54px; z-index: 30; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 20px; padding: 0 8px 0 22px; border-radius: 99px; color: var(--fg);
  background: color-mix(in srgb, var(--inv) 74%, transparent); -webkit-backdrop-filter: blur(16px) saturate(1.5); backdrop-filter: blur(16px) saturate(1.5);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fg) 10%, transparent), 0 10px 28px -14px rgba(0, 0, 0, .35); transition: background .5s, color .5s; }
.top .brand { min-height: 0; } .top .brand b { font-size: 19px; }
.top .menu a { padding: 8px 0; }
.write { min-height: 38px; padding: 0 17px; border-radius: 99px; background: var(--fg); color: var(--inv); font-size: 13.5px; font-weight: 600; letter-spacing: -.01em; transition: background .5s, color .5s, transform .12s; }
@media (max-width: 760px) { .top, body[data-past="1"] .top { grid-template-columns: 1fr auto; gap: 12px; padding: 0 8px 0 20px; } }

/* ── 인기 게시물: 1위는 사진 위에 제목을 얹어 크게, 2·3위는 나란히. 들어올 때 사진이 열리고 숫자가 올라온다 ── */
.lead { grid-template-columns: 1fr 1fr; gap: 26px 14px; }
.pop-card { display: grid; gap: 10px; align-content: start; min-width: 0; opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform 1s var(--ease); transition-delay: calc(var(--i) * 120ms + 60ms); }
.block.in .pop-card { opacity: 1; transform: none; }
.pop-card.first { grid-column: 1 / -1; }
.pc-img { position: relative; display: block; aspect-ratio: 1; overflow: hidden; border-radius: 14px; background: var(--beige); clip-path: inset(100% 0 0 0 round 14px); transition: clip-path 1.2s var(--ease); transition-delay: inherit; }
.block.in .pc-img { clip-path: inset(0 round 14px); }
.first .pc-img { aspect-ratio: 16 / 11; }
.im { position: absolute; inset: 0; background: center / cover; transform: scale(1.16); transition: transform 1.8s var(--ease); transition-delay: inherit; }
.block.in .im { transform: none; }
.block.in .pop-card:active .im { transform: scale(1.05); transition-duration: .4s; transition-delay: 0s; }
@media (hover: hover) { .block.in .pop-card:hover .im { transform: scale(1.05); transition-duration: .9s; transition-delay: 0s; } }
.pc-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(20, 18, 15, .8), rgba(20, 18, 15, 0) 58%); }
.pc-views { position: absolute; right: 10px; top: 10px; z-index: 1; padding: 6px 11px; border-radius: 99px; background: rgba(20, 18, 15, .5); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: #fff; font-size: 12px; font-variant-numeric: tabular-nums; }
.pc-views i { font-style: normal; font-weight: 600; }
.pc-rank { position: absolute; left: 14px; bottom: 4px; z-index: 1; font-family: var(--serif); font-weight: 400; font-size: 64px; line-height: 1; color: #fff; opacity: 0; transform: translateY(45%); transition: opacity .7s var(--ease), transform 1s var(--ease); transition-delay: calc(var(--i) * 120ms + 520ms); }
.block.in .pc-rank { opacity: 1; transform: none; }
.pc-over { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; display: grid; grid-template-columns: auto 1fr; align-items: end; gap: 16px; padding: 18px 20px 16px; color: #fff; }
.pc-over .pc-rank { position: static; font-size: 104px; line-height: .82; }
.pc-txt { display: grid; gap: 5px; min-width: 0; }
.pc-txt strong { font-family: "Noto Serif KR", var(--serif); font-weight: 600; font-size: 16.5px; line-height: 1.42; letter-spacing: -.02em; }
.pc-over .tag { color: #dfe6dc; } .pc-over strong { font-size: clamp(21px, 2.2vw, 30px); line-height: 1.3; }
@media (max-width: 760px) { .first .pc-img { aspect-ratio: 4 / 5; } .pc-over { padding: 16px 16px 14px; gap: 12px; } .pc-over .pc-rank { font-size: 88px; } .pc-rank { font-size: 54px; left: 12px; } }
@media (prefers-reduced-motion: reduce) { .pop-card, .pc-img, .im, .pc-rank { opacity: 1; transform: none; clip-path: inset(0 round 14px); transition: none; } }

/* 하단 큰 글자: 「daily」가 d 의 윗부분과 겹치지 않게 띄운다. 터치 화면에서는 눌렀던 링크에 밑줄이 남지 않게 한다 */
.f2-word b { margin-top: .13em; }
.f2-word small { margin-bottom: 0; }
.f2-links a:hover { text-decoration: none; }
@media (hover: hover) { .f2-links a:hover { text-decoration: underline; text-underline-offset: 3px; } }
@media (max-width: 760px) { .f2-word { margin-top: 30px; } .f2-word small { font-size: 6.4vw; } }

/* 카테고리 · 관리 화면은 첫 화면의 표지 색을 따르지 않고 종이색 바탕 그대로 */
:root[data-page="sub"] { --bgc: #F8F6F1; }

/* ── 검색: 머리줄 띠가 입력 줄로 바뀌고 아래로 결과 판이 내려온다 ── */
.top, body[data-past="1"] .top { grid-template-columns: auto 1fr auto auto; }
.top > .brand, .top > .menu, .top > .write, .top > .s-btn { transition: opacity .3s, transform .45s var(--ease), background .5s, color .5s; }
.s-btn { display: grid; place-items: center; width: 40px; height: 40px; margin-right: -12px; padding: 0; border-radius: 50%; background: none; color: inherit; }
@media (hover: hover) { .s-btn:hover { background: color-mix(in srgb, var(--fg) 10%, transparent); } }
.s-form { position: absolute; inset: 0; display: flex; align-items: center; gap: 12px; padding: 0 8px 0 20px; opacity: 0; visibility: hidden; transition: opacity .3s, visibility 0s .3s; }
.s-form svg { flex: none; transform: translateX(26px) scale(.8); transition: transform .5s var(--ease); }
.s-form input { flex: 1; min-width: 0; height: 40px; padding: 0; border: 0; border-radius: 0; background: none; color: inherit; font-size: 16px; outline: none; -webkit-appearance: none; appearance: none; transform: translateX(26px); transition: transform .5s var(--ease); }
.s-form input::placeholder { color: color-mix(in srgb, currentColor 45%, transparent); }
.s-form input::-webkit-search-cancel-button { display: none; }
.s-x { flex: none; min-height: 38px; padding: 0 16px; border-radius: 99px; background: color-mix(in srgb, var(--fg) 9%, transparent); color: inherit; font-size: 13.5px; font-weight: 600; transform: translateX(12px); transition: transform .5s var(--ease); }
.searching .top { --fg: #252923; --inv: #F8F6F1; background: #F8F6F1; }
.searching .top > .brand, .searching .top > .menu { opacity: 0; transform: translateX(-18px); pointer-events: none; }
.searching .top > .write, .searching .top > .s-btn { opacity: 0; transform: scale(.9); pointer-events: none; }
.searching .s-form { opacity: 1; visibility: visible; transition-delay: .08s, 0s; }
.searching .s-form svg, .searching .s-form input, .searching .s-x { transform: none; }
.s-dim { position: fixed; inset: 0; z-index: 28; background: rgba(20, 18, 15, .42); opacity: 0; visibility: hidden; transition: opacity .4s, visibility 0s .4s; }
.searching .s-dim { opacity: 1; visibility: visible; transition-delay: 0s; }
.s-panel { position: fixed; z-index: 29; left: 50%; top: calc(70px + env(safe-area-inset-top)); width: min(1180px, calc(100% - 24px)); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 14px 14px 18px; border-radius: 24px; background: var(--paper); color: var(--ink); box-shadow: 0 30px 60px -28px rgba(0, 0, 0, .5);
  opacity: 0; visibility: hidden; transform: translate(-50%, -18px) scale(.97); transform-origin: 50% 0; transition: transform .5s var(--ease), opacity .28s, visibility 0s .5s; }
.searching .s-panel { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition-delay: .06s, .06s, 0s; }
.s-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 0 14px 6px; }
.s-chips::-webkit-scrollbar { display: none; }
.s-chips button { flex: none; min-height: 38px; padding: 0 15px; border-radius: 99px; background: none; color: var(--ink); font-size: 13.5px; font-weight: 500; box-shadow: inset 0 0 0 1px rgba(37, 41, 35, .18); transition: background .25s, color .25s, transform .12s; }
.s-chips button[aria-pressed="true"] { background: var(--ink); color: var(--paper); box-shadow: none; }
.s-label { margin: 12px 6px 4px; font-size: 12.5px; color: #7d7a72; }
.s-row { display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: center; padding: 10px 6px; border-radius: 14px; opacity: 0; animation: s-in .55s var(--ease) forwards; animation-delay: calc(var(--i) * 45ms + 40ms); }
@keyframes s-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.s-row .ph { aspect-ratio: 1; border-radius: 10px; background: var(--beige) center / cover; }
.s-t { display: grid; gap: 3px; min-width: 0; }
.s-t b { font-family: "Noto Serif KR", var(--serif); font-weight: 600; font-size: 16.5px; line-height: 1.4; letter-spacing: -.02em; }
.s-t small { font-size: 13.5px; line-height: 1.55; color: #5b5f56; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.s-panel mark { background: linear-gradient(transparent 58%, #cfe0d2 58%); color: inherit; font-weight: 700; }
.s-row:active { background: rgba(37, 41, 35, .06); }
@media (hover: hover) { .s-row:hover { background: rgba(37, 41, 35, .05); } }
.s-none { margin: 0; padding: 34px 8px 26px; text-align: center; font-size: 15px; line-height: 1.7; color: #5b5f56; animation: s-in .5s var(--ease) both; }
@media (max-width: 760px) {
  .top, body[data-past="1"] .top { grid-template-columns: 1fr auto auto; }
  .s-btn { margin-right: -6px; }
  .s-form { padding-left: 18px; gap: 10px; }
}
@media (min-width: 761px) { .s-panel { padding: 18px 20px 22px; } .s-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; } .s-label, .s-none { grid-column: 1 / -1; } }
@media (prefers-reduced-motion: reduce) { .s-row, .s-none { animation: none; opacity: 1; } .s-panel, .s-form svg, .s-form input, .s-x { transition: none; } }
.s-all { margin-top: 12px; min-height: 42px; padding: 0 18px; border-radius: 99px; background: var(--ink); color: var(--paper); font-size: 14px; font-weight: 600; }
body.searching .top, body.searching[data-past="1"] .top { background: #F8F6F1; }

/* ── 휴대폰: 구역 사이 빈 공간을 줄이고 가는 회색 선으로 나눈다(선은 구역이 들어올 때 왼쪽에서 그어진다) ── */
@media (max-width: 760px) {
  .block, .block + .block { padding-top: 46px; padding-bottom: 46px; gap: 22px; }
  .tunnel + .block { padding-top: 40px; }
  .block + .block::before { content: ""; position: absolute; left: 16px; right: 16px; top: 0; height: 1px; background: rgba(37, 41, 35, .18); transform: scaleX(0); transform-origin: 0 50%; transition: transform 1.1s var(--ease); }
  .block.in::before { transform: none; }
  .apply.block { padding-bottom: 56px; }
  .b-title { margin: 10px 0 12px; }
}
@media (max-width: 760px) and (prefers-reduced-motion: reduce) { .block + .block::before { transform: none; transition: none; } }

/* ── 휴대폰: 첫 화면 글과 구역 제목의 균형 ──
   첫 화면: 설명(왼쪽)과 「글 보러 가기」(오른쪽)를 한 줄에 놓는다(단추만 혼자 떠 있지 않게).
   구역 제목: 한 줄로 줄여서 첫 화면의 큰 제목과 다투지 않게 하고, 첫 구역 위에도 선을 긋는다 */
@media (max-width: 760px) {
  .info { display: grid; grid-template-columns: 1fr auto; column-gap: 14px; align-items: end; }
  .info .i-top, .info .display { grid-column: 1 / -1; }
  .info .i-sum { margin: 6px 0 4px; align-self: center; }
  .i-go { grid-column: 2; align-self: end; margin-top: 0; min-height: 48px; padding: 0 6px 0 18px; gap: 10px; font-size: 14px; }
  .i-go i { width: 36px; height: 36px; font-size: 16px; }
  .tunnel .pin { padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
  .tunnel + .block::before { content: ""; position: absolute; left: 16px; right: 16px; top: 0; height: 1px; background: rgba(37, 41, 35, .18); transform: scaleX(0); transform-origin: 0 50%; transition: transform 1.1s var(--ease); }
  .tunnel + .block { padding-top: 46px; }
  .b-title { font-size: 32px; line-height: 1.15; margin: 8px 0 8px; }
  .b-title .ln { display: inline-block; vertical-align: top; padding-bottom: .1em; }
  .b-title .ln + .ln { margin-left: .22em; }
  .b-head p { max-width: none; font-size: 14.5px; }
}
/* 키가 작은 화면은 설명이 숨으므로 제목 옆에 단추를 둔다 */
@media (max-width: 760px) and (max-height: 700px) { .info .display { grid-column: 1; } .i-go { grid-row: 2; align-self: center; } }
@media (max-width: 760px) { .tunnel + .block.in::before { transform: none; } }

/* ── 노트북 · 큰 화면: 가운데 1180px 로 묶지 않고 양옆 끝까지 쓴다(머리줄 · 구역 · 카테고리 페이지 · 검색 판 모두 같은 폭) ── */
@media (min-width: 761px) {
  .top, body[data-past="1"] .top, .s-panel { width: calc(100% - var(--gut) * 2); }
  .block, .cat-main { max-width: none; }
  .block { grid-template-columns: clamp(260px, 22vw, 380px) 1fr; gap: 24px clamp(40px, 4vw, 80px); }
  .b-head p { max-width: 30ch; }
  .lead { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 16px; }
  .pop-card.first { grid-column: 1; grid-row: 1 / -1; grid-template-rows: 1fr; align-content: stretch; }
  .first .pc-img { aspect-ratio: auto; min-height: 420px; }
  .pop-card:not(.first) .pc-img { aspect-ratio: 16 / 10; }
  .latest { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
  .grid { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
  .g-card { max-width: 760px; }
}
/* 아주 넓은 화면: 신청 폼의 네 칸(가게 · 업종 · 담당자 · 연락처)을 한 줄에 놓아 폭을 채운다 */
@media (min-width: 1400px) { .apply .form { grid-template-columns: 1fr 1fr; column-gap: 14px; } .apply .form > :not(.row), .apply .form > .row.end { grid-column: 1 / -1; } }

/* ── 노트북 · 큰 화면 하단: 화면 폭을 꽉 채우던 큰 글자를 「daily discoveries」 한 줄로 줄인다 ── */
@media (min-width: 761px) {
  .foot2 { padding-top: 56px; }
  .f2-word { display: flex; align-items: baseline; gap: .22em; margin-top: 56px; font-size: clamp(64px, 8.4vw, 150px); line-height: 1; }
  .f2-word small { font-size: 1em; margin: 0; letter-spacing: -.03em; }
  .f2-word b { display: flex; justify-content: flex-start; margin-top: 0; font-size: 1em; letter-spacing: -.03em; padding-bottom: .1em; }
  .f2-end { margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(35, 54, 43, .18); }
}

/* ── 노트북 · 큰 화면 하단의 균형: 왼쪽에 큰 글자, 오른쪽 끝에 링크 두 칸, 아래 줄은 왼쪽 · 가운데 · 오른쪽 ── */
@media (min-width: 761px) {
  .foot2 { display: grid; grid-template-columns: 1fr auto; align-items: end; column-gap: 48px; padding-top: 64px; }
  .f2-word { grid-column: 1; grid-row: 1; margin-top: 0; }
  .f2-top { grid-column: 2; grid-row: 1; display: grid; grid-template-columns: auto auto; gap: 0 clamp(48px, 7vw, 120px); align-self: end; padding-bottom: .5vw; }
  .f2-end { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto 1fr; align-items: baseline; }
  .f2-end span:last-child { text-align: right; }
}

/* ── 노트북 · 큰 화면 하단: 링크 칸을 빼고 「daily discoveries」를 가운데에 둔다 ── */
@media (min-width: 761px) {
  .foot2 { display: block; padding-top: 72px; }
  .f2-top { display: none; }
  .f2-word { justify-content: center; margin: 0 0 8px; }
  .f2-end { margin-top: 44px; }
}

/* 노트북 · 큰 화면 첫 화면: 왼쪽 글을 바닥에서 올려 표지와 같은 높이(가운데)에 둔다 */
@media (min-width: 761px) { .info { bottom: auto; top: 56%; transform: translateY(-50%); } }

/* 노트북 · 큰 화면 글 읽기: 글 칸을 좁게 묶지 않고 오른쪽 끝까지 쓴다(줄이 길어지는 만큼 글자를 조금 키운다) */
@media (min-width: 761px) {
  .r-in { max-width: none; }
  .r-in p { font-size: clamp(17px, 1.05vw, 20px); }
  .r-sum { font-size: clamp(18px, 1.15vw, 22px); }
}

/* ── 글 안 사진 묶음(1~4장): 자르지 않고 원본 비율 그대로. 한 줄의 사진들은 높이가 같다 ── */
.gal { display: grid; gap: 6px; margin: 26px 0; }
.gal-row { display: flex; gap: 6px; justify-content: center; }
.gal-item { flex: var(--ar) 1 0%; aspect-ratio: var(--ar); min-width: 0; margin: 0; overflow: hidden; border-radius: 8px; background: var(--beige); }
.gal-item img { display: block; width: 100%; height: 100%; object-fit: cover; }   /* 칸이 사진과 같은 비율이라 잘리지 않는다 */
/* 한 장만 있는 줄: 세로 사진이 화면보다 길어지지 않게 높이를 막는다(폭이 같이 줄어 가운데에 놓인다) */
.gal-row.solo .gal-item { flex: 0 1 auto; width: min(100%, calc(84svh * var(--ar))); }

/* ── 사진이 없는 글: 카테고리마다 정해 둔 기본 표지(바탕색 + 번호 + 카테고리 이름) ── */
.nocover { position: relative; display: flex; flex-direction: column; justify-content: space-between; width: 100%; height: 100%; padding: 9%; overflow: hidden; container-type: inline-size; background: var(--c-bg, var(--beige)); color: var(--c-fg, var(--ink)); }
.nocover::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, transparent 0 22px, color-mix(in srgb, currentColor 7%, transparent) 22px 23px); }
.nocover::after { content: ""; position: absolute; right: -18%; bottom: -26%; width: 74%; aspect-ratio: 1; border-radius: 50%; border: 1px solid color-mix(in srgb, currentColor 26%, transparent); box-shadow: 0 0 0 9cqw color-mix(in srgb, currentColor 5%, transparent); }
.nocover > * { position: relative; z-index: 1; }
.nc-no { font-family: var(--serif); font-size: 15cqw; line-height: .9; opacity: .9; }
.nc-name { font-family: var(--serif); font-weight: 400; font-size: 12.5cqw; line-height: 1.12; letter-spacing: -.03em; max-width: 6em; }
.nc-mark { position: absolute; right: 9%; top: 9%; font-size: max(9px, 3.4cqw); letter-spacing: .14em; opacity: .6; }
/* 사진 묶음이 들어올 때: 사진이 아래에서 열리며 차례로 떠오른다 */
.gal-item { opacity: 0; transform: translateY(22px); clip-path: inset(100% 0 0 0 round 8px); transition: opacity .7s var(--ease), transform .9s var(--ease), clip-path 1.1s var(--ease); transition-delay: calc(var(--i, 0) * 110ms); }
.gal-item img { transform: scale(1.12); transition: transform 1.6s var(--ease); transition-delay: inherit; }
.gal.in .gal-item { opacity: 1; transform: none; clip-path: inset(0 round 8px); }
.gal.in .gal-item img { transform: none; }
@media (prefers-reduced-motion: reduce) { .gal-item, .gal-item img { opacity: 1; transform: none; clip-path: none; transition: none; } }

/* ── 사진 자르기: 사진 위에서 직접 끌어 남길 자리를 고른다 ── */
.crop:not(.ready) { display: none; }
.crop-stage { display: grid; place-items: center; padding: 14px; border-radius: 18px; background: #1d201c; }
.crop-pic { position: relative; width: min(100%, calc(64svh * var(--ar, 1))); aspect-ratio: var(--ar, 1); overflow: hidden; border-radius: 4px; cursor: crosshair; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.crop-pic img { display: block; width: 100%; height: 100%; pointer-events: none; -webkit-user-drag: none; }
.crop-sel { position: absolute; cursor: move; box-shadow: 0 0 0 1.5px #fff, 0 0 0 9999px rgba(15, 17, 14, .62); transition: box-shadow .2s;
  background: linear-gradient(to right, transparent calc(33.33% - .5px), rgba(255,255,255,.5) calc(33.33% - .5px) calc(33.33% + .5px), transparent calc(33.33% + .5px) calc(66.66% - .5px), rgba(255,255,255,.5) calc(66.66% - .5px) calc(66.66% + .5px), transparent calc(66.66% + .5px)),
              linear-gradient(to bottom, transparent calc(33.33% - .5px), rgba(255,255,255,.5) calc(33.33% - .5px) calc(33.33% + .5px), transparent calc(33.33% + .5px) calc(66.66% - .5px), rgba(255,255,255,.5) calc(66.66% - .5px) calc(66.66% + .5px), transparent calc(66.66% + .5px)); }
.crop-pic:not(.moving) .crop-sel { background: none; }
/* 손잡이: 보이는 점은 작게, 손가락이 닿는 자리는 44px 로 넉넉하게 */
.crop-sel i { position: absolute; width: 44px; height: 44px; margin: -22px; }
.crop-sel i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .5); }
.crop-sel i[data-h="nw"] { left: 0; top: 0; cursor: nwse-resize; } .crop-sel i[data-h="ne"] { left: 100%; top: 0; cursor: nesw-resize; }
.crop-sel i[data-h="se"] { left: 100%; top: 100%; cursor: nwse-resize; } .crop-sel i[data-h="sw"] { left: 0; top: 100%; cursor: nesw-resize; }
.crop-sel i[data-h="n"] { left: 50%; top: 0; cursor: ns-resize; } .crop-sel i[data-h="s"] { left: 50%; top: 100%; cursor: ns-resize; }
.crop-sel i[data-h="w"] { left: 0; top: 50%; cursor: ew-resize; } .crop-sel i[data-h="e"] { left: 100%; top: 50%; cursor: ew-resize; }
.crop-sel i[data-h="n"]::after, .crop-sel i[data-h="s"]::after { width: 26px; height: 6px; margin: -3px -13px; border-radius: 3px; }
.crop-sel i[data-h="w"]::after, .crop-sel i[data-h="e"]::after { width: 6px; height: 26px; margin: -13px -3px; border-radius: 3px; }
.crop-size { position: absolute; left: 6px; bottom: 6px; padding: 3px 8px; border-radius: 99px; background: rgba(15, 17, 14, .6); color: #fff; font-size: 11px; font-weight: 500; font-variant-numeric: tabular-nums; pointer-events: none; opacity: 0; transition: opacity .2s; }
.crop-pic.moving .crop-size { opacity: 1; }
.crop-result { margin: 12px 0 0; overflow: hidden; border-radius: 8px; width: min(100%, calc(84svh * var(--ar, 1))); aspect-ratio: var(--ar, 1); background: var(--beige); }
.crop-result img { display: block; width: 100%; height: 100%; }

/* ── 인기 게시물: 액자 ── 사진을 자르지 않고 통째로 넣는다. 남는 자리는 종이 바탕(매트)이고, 사진에는 인화지 같은 흰 테두리와 그림자가 있다.
   가로 사진이든 휴대폰 세로 사진이든 칸 모양이 변하지 않고, 빈 곳이 「여백」이 아니라 액자로 보인다 */
.pc-img.frame { background: #E4DBCB; box-shadow: inset 0 0 0 1px rgba(37, 41, 35, .1), inset 0 0 0 10px #EDE6D9, inset 0 0 0 11px rgba(37, 41, 35, .1), inset 0 18px 40px -22px rgba(60, 44, 20, .35); }
.pc-img.frame::after { display: none; }
.fr-pic { position: absolute; inset: 26px 26px 62px; }
.fr-pic img { position: absolute; inset: 0; margin: auto; box-sizing: border-box; max-width: 100%; max-height: 100%; width: auto; height: auto; border: 6px solid #fbfaf6; border-radius: 2px; box-shadow: 0 1px 2px rgba(40, 30, 14, .28), 0 18px 30px -14px rgba(40, 30, 14, .5); transform: scale(1.06) translateY(10px); opacity: 0; transition: transform 1.3s var(--ease), opacity .7s var(--ease); transition-delay: calc(var(--i) * 120ms + 320ms); }
.block.in .fr-pic img { transform: none; opacity: 1; }
@media (hover: hover) { .block.in .pop-card:hover .fr-pic img { transform: scale(1.025); transition-duration: .7s; transition-delay: 0s; } }
.block.in .pop-card:active .fr-pic img { transform: scale(1.02); transition-duration: .3s; transition-delay: 0s; }
/* 액자 아래쪽 이름표: 순위 숫자와 조회수 */
.frame .pc-rank { color: var(--ink); left: 24px; bottom: 16px; font-size: 40px; }
.frame .pc-views { top: auto; right: 22px; bottom: 22px; background: rgba(37, 41, 35, .08); -webkit-backdrop-filter: none; backdrop-filter: none; color: #5b554c; }
.first .fr-pic { inset: 34px 34px 132px; }
.first .frame .pc-over { color: var(--ink); padding: 0 34px 28px; gap: 18px; }
.first .frame .pc-over .pc-rank { color: var(--ink); font-size: 96px; }
.first .frame .pc-over .tag { color: var(--accent); }
.first .frame .pc-views { top: 22px; bottom: auto; right: 22px; }
@media (max-width: 760px) {
  .fr-pic { inset: 18px 18px 50px; } .fr-pic img { border-width: 4px; }
  .frame .pc-rank { left: 18px; bottom: 12px; font-size: 32px; } .frame .pc-views { right: 16px; bottom: 16px; padding: 4px 9px; font-size: 11px; }
  .first .fr-pic { inset: 26px 26px 124px; }
  .first .frame .pc-over { padding: 0 20px 20px; gap: 12px; } .first .frame .pc-over .pc-rank { font-size: 80px; }
  .first .frame .pc-views { top: 16px; right: 16px; }
}
@media (prefers-reduced-motion: reduce) { .fr-pic img { transform: none; opacity: 1; transition: none; } }

/* ── 액자 다시: 사진이 들어가는 창(매트가 뚫린 자리)을 칸마다 같은 여백으로 맞춘다 → 창의 가장자리가 액자와 나란하다.
   사진은 그 창을 꽉 채운다(가운데 기준). 가로 · 세로 사진이 섞여도 창 크기가 들쭉날쭉하지 않다 ── */
.fr-pic { inset: 22px 22px 60px; border: 6px solid #fbfaf6; border-radius: 2px; overflow: hidden; background: #d9cfbd; box-shadow: 0 1px 2px rgba(40, 30, 14, .28), 0 16px 28px -14px rgba(40, 30, 14, .5); }
.fr-pic img { inset: 0; margin: 0; width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; border: 0; border-radius: 0; box-shadow: none; transform: scale(1.1); }
.first .fr-pic { inset: 28px 28px 128px; }
.frame .pc-rank { left: 24px; bottom: 12px; } .frame .pc-views { right: 22px; bottom: 18px; }
@media (max-width: 760px) { .fr-pic { inset: 14px 14px 48px; border-width: 4px; } .first .fr-pic { inset: 20px 20px 118px; } .frame .pc-rank { left: 16px; bottom: 9px; } .frame .pc-views { right: 14px; bottom: 13px; } }

/* ── 목록 카드의 사진 모둠(1~4장). 칸 모양은 그대로, 안에서만 나눈다 ── */
.ph.mo { position: relative; display: grid; gap: 2px; overflow: hidden; background: none; }
.ph.mo i { background: var(--beige) center / cover; min-height: 0; transition: transform .8s var(--ease); }
.ph.mo[data-n="2"] { grid-template-columns: 1fr 1fr; }
.ph.mo[data-n="3"] { grid-template-columns: 1.6fr 1fr; grid-template-rows: 1fr 1fr; } .ph.mo[data-n="3"] i:first-child { grid-row: 1 / -1; }
.ph.mo[data-n="4"] { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.ph.mo em { position: absolute; right: 8px; bottom: 8px; padding: 3px 8px; border-radius: 99px; background: rgba(20, 18, 15, .55); color: #fff; font-style: normal; font-size: 11px; font-weight: 500; }
@media (hover: hover) { .latest a:hover .ph.mo i { transform: scale(1.04); } }
.r-in .gal { margin: 6px 0 30px; }

/* ── 액자 꾸미기: 왼쪽 위 모서리에 마스킹 테이프, 오른쪽 모서리에 카테고리 스티커(흰 테두리 동그라미). 들어올 때 톡 붙는다 ── */
.st-tape { position: absolute; z-index: 2; left: 4px; top: 22px; width: 66px; height: 20px; transform: rotate(-38deg) scaleX(0); transform-origin: 50% 50%; opacity: .92; pointer-events: none;
  background: repeating-linear-gradient(90deg, #EFD9A0 0 7px, #F6E7BE 7px 14px); box-shadow: 0 2px 4px rgba(40, 30, 14, .22);
  clip-path: polygon(0 0, 4% 30%, 0 55%, 4% 80%, 0 100%, 100% 100%, 96% 72%, 100% 48%, 96% 22%, 100% 0);
  transition: transform .5s var(--ease); transition-delay: calc(var(--i) * 120ms + 900ms); }
.block.in .st-tape { transform: rotate(-38deg); }
.st { position: absolute; z-index: 2; right: 6px; top: 6px; width: 46px; height: 46px; border-radius: 50%; background: var(--sc); border: 3.5px solid #fff; box-shadow: 0 3px 8px rgba(40, 30, 14, .32); pointer-events: none;
  transform: rotate(12deg) scale(0); transition: transform .55s cubic-bezier(.34, 1.56, .64, 1); transition-delay: calc(var(--i) * 120ms + 1050ms); }
.st svg { display: block; width: 100%; height: 100%; }
.block.in .st { transform: rotate(12deg); }
.pop-card:nth-child(3) .st { transform: rotate(-10deg) scale(0); } .block.in .pop-card:nth-child(3) .st { transform: rotate(-10deg); }
@media (hover: hover) { .block.in .pop-card:hover .st { transform: rotate(-6deg) scale(1.12); transition-delay: 0s; } }
/* 1위: 스티커를 크게, 사진 오른쪽 아래 모서리에(조회수 표시는 오른쪽 위에 있다) */
.first .st-tape { left: 4px; top: 30px; width: 92px; height: 26px; }
.first .st { right: 8px; top: auto; bottom: 98px; width: 70px; height: 70px; border-width: 5px; }
@media (min-width: 761px) { .lead { row-gap: 40px; } }
@media (max-width: 760px) {
  .st-tape { left: 0; top: 14px; width: 46px; height: 15px; } .st { right: 2px; top: 2px; width: 34px; height: 34px; border-width: 3px; }
  .first .st-tape { top: 22px; width: 70px; height: 20px; } .first .st { right: 4px; bottom: 96px; width: 54px; height: 54px; border-width: 4px; }
}
@media (prefers-reduced-motion: reduce) { .st-tape, .st { transition: none; } .st-tape { transform: rotate(-38deg); } .st { transform: rotate(12deg); } }

/* 노트북 · 큰 화면: 왼쪽 구역 제목을 머리줄에서 더 떨어뜨린다(따라 내려올 때도 같은 거리) */
@media (min-width: 761px) { .b-head { top: 150px; margin-top: 44px; } }
/* 큰 화면: 구역 사이를 더 띄워서, 앞 구역 제목이 올라가 사라진 뒤에 다음 구역 제목이 들어오게 한다(두 제목이 겹쳐 보이지 않게) */
@media (min-width: 761px) { .block + .block { padding-top: 150px; } .block { padding-bottom: 70px; } }

/* ── 댓글의 답글 ── */
.r-cm .list > li { grid-template-columns: 40px 1fr; }
.r-cm .list li > div { min-width: 0; }
.r-cm .list b { margin-right: 8px; } .r-cm .list time { font-size: 12px; color: #8a877f; }
.ed-tag { margin-left: 6px; padding: 1px 7px; border-radius: 99px; background: var(--accent); color: #fff; font-style: normal; font-size: 11px; font-weight: 600; vertical-align: 1px; }
.face.ed { background: var(--ink); }
.cm-re { min-height: 32px; margin-top: 2px; padding: 0; background: none; color: #7d7a72; font-size: 13px; font-weight: 500; border-radius: 0; }
.cm-re:active { transform: none; } @media (hover: hover) { .cm-re:hover { color: var(--accent); } }
.re-list { grid-column: 2; list-style: none; margin: 6px 0 0; padding: 0 0 0 14px; border-left: 2px solid rgba(37, 41, 35, .12); }
.re-list li { display: grid; grid-template-columns: 32px 1fr; gap: 10px; padding: 10px 0; }
.re-list .face { width: 32px !important; height: 32px !important; font-size: 13px !important; }
.re-list li.new, .re-form { animation: rise .6s var(--ease); }
.re-form { grid-column: 2; display: grid; gap: 8px; margin-top: 8px; padding: 12px; border-radius: 14px; background: var(--beige); }
.re-form input, .re-form textarea { width: 100%; min-width: 0; background: var(--paper); border-color: transparent; border-radius: 10px; }
.re-form button { min-height: 42px; padding: 0 18px; font-size: 14px; }

/* ── 관리 화면(admin.html): 사이트와 같은 종이 바탕 · 큰 세리프 · 알약 단추 ── */
.adm-top, body[data-past="1"] .adm-top { grid-template-columns: auto 1fr auto; }
.adm-who { justify-self: end; font-size: 13px; color: #7d7a72; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.adm { margin: 0 auto; padding: 120px var(--gut) 110px; color: var(--ink); }
.adm[hidden] { display: none; }
.adm .ln > span { transform: translateY(105%); } .adm.in .ln > span { transform: none; }
.adm-h { margin: 12px 0 0; font-family: var(--serif); font-weight: 400; font-size: clamp(44px, 6vw, 88px); line-height: 1.02; letter-spacing: -.035em; }
.adm-login { max-width: 520px; } .adm-login .form { margin-top: 30px; opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease) .25s, transform .8s var(--ease) .25s; }
.adm-login.in .form { opacity: 1; transform: none; }
.adm-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; }
.adm-new { display: inline-flex; align-items: center; gap: 12px; min-height: 54px; padding: 0 8px 0 24px; background: var(--ink); color: var(--paper); font-size: 15px; }
.adm-new i { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--paper); color: var(--ink); font-style: normal; font-size: 20px; }
.adm-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 30px 0 22px; }
.adm-stats div { padding: 16px 18px; border-radius: 14px; background: var(--beige); opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .7s var(--ease); transition-delay: calc(var(--i) * 70ms + 150ms); }
.adm.in .adm-stats div { opacity: 1; transform: none; }
.adm-stats small { display: block; font-size: 12.5px; color: #6b665c; } .adm-stats b { font-family: var(--serif); font-weight: 400; font-size: 34px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.adm-tabs, .ed-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.adm-tabs button, .ed-chips button, .adm .ghost { min-height: 42px; padding: 0 16px; background: none; color: var(--ink); font-size: 14px; font-weight: 500; box-shadow: inset 0 0 0 1px rgba(37, 41, 35, .2); transition: background .25s, color .25s, transform .12s; }
.adm-tabs button[aria-pressed="true"], .ed-chips button[aria-pressed="true"] { background: var(--ink); color: var(--paper); box-shadow: none; }
.adm-tabs i { font-style: normal; opacity: .6; margin-left: 2px; font-variant-numeric: tabular-nums; }
.adm-list { list-style: none; margin: 14px 0 0; padding: 0; }
.adm-list li { display: flex; align-items: center; gap: 14px; padding: 16px 0; border-top: 1px solid rgba(37, 41, 35, .16); opacity: 0; transform: translateY(14px); animation: s-in .55s var(--ease) forwards; animation-delay: calc(var(--i) * 45ms + 80ms); }
.adm-list .none { display: block; color: #7d7a72; }
.al-ph { flex: none; width: 76px; aspect-ratio: 4 / 3; border-radius: 6px; background: var(--beige) center / cover; }
.adm-list .face { flex: none; width: 40px; height: 40px; margin: 0; align-self: start; }
.al-t { flex: 1; min-width: 0; } .al-t small { display: block; font-size: 12.5px; color: #7d7a72; } .al-t b { font-family: "Noto Serif KR", var(--serif); font-weight: 600; font-size: 17px; line-height: 1.4; }
.al-t p { margin: 3px 0 0; font-size: 14.5px; line-height: 1.6; overflow-wrap: anywhere; }
.al-st { flex: none; padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--beige); color: #6b665c; } .al-st.published { background: #dfe6dc; color: var(--accent); }
.al-btn { flex: none; display: flex; gap: 6px; } .al-btn button { min-height: 40px; padding: 0 14px; font-size: 13.5px; background: none; color: var(--ink); box-shadow: inset 0 0 0 1px rgba(37, 41, 35, .2); }
.al-btn .del { color: #a13a2a; box-shadow: inset 0 0 0 1px rgba(161, 58, 42, .4); }
/* 글 쓰기: 왼쪽에 쓰는 칸, 오른쪽에 따라오는 미리보기 */
.adm-edit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 420px); gap: 40px clamp(32px, 4vw, 72px); align-items: start; }
.adm-edit[hidden] { display: none; }
.ed-main { display: grid; gap: 16px; min-width: 0; opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .8s var(--ease); } .adm.in .ed-main { opacity: 1; transform: none; }
.ed-backbtn { justify-self: start; min-height: 40px; padding: 0; background: none; color: #6b6f64; font-size: 14px; font-weight: 500; border-radius: 0; }
.ed-title { width: 100%; padding: 6px 0 10px; border: 0; border-bottom: 1px solid rgba(37, 41, 35, .25); border-radius: 0; background: none; font-family: var(--serif); font-size: clamp(30px, 3.6vw, 52px); letter-spacing: -.03em; line-height: 1.2; color: var(--ink); }
.ed-title:focus-visible { outline: 0; border-bottom-color: var(--ink); }
.ed-l { font-size: 13px; } .ed-l input, .ed-l textarea, .ed-b input, .ed-b textarea { width: 100%; min-width: 0; background: var(--beige); border-color: transparent; border-radius: 10px; }
.ed-h { margin: 22px 0 0; padding-top: 22px; border-top: 1px solid rgba(37, 41, 35, .16); font-family: var(--serif); font-weight: 400; font-size: 28px; letter-spacing: -.03em; }
.ed-h small { font-family: var(--sans); font-size: 13px; color: #7d7a72; margin-left: 8px; letter-spacing: 0; }
.ed-photos { display: flex; gap: 8px; align-items: stretch; }
.ed-photos .thumbs { display: contents; }
.ed-photos .thumbs button, .ed-add { position: relative; flex: 0 0 88px; aspect-ratio: 1; padding: 0; border-radius: 10px; overflow: hidden; background: var(--beige) center / cover; opacity: .6; transition: opacity .25s, box-shadow .25s; }
.ed-photos .thumbs button[aria-pressed="true"] { opacity: 1; box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--ink); }
.ed-photos em { position: absolute; left: 5px; top: 5px; padding: 2px 7px; border-radius: 99px; background: var(--accent); color: #fff; font-style: normal; font-size: 11px; font-weight: 600; }
.ed-add { display: grid; place-items: center; opacity: 1; background: none; border: 1.5px dashed rgba(37, 41, 35, .35); font-size: 14px; font-weight: 600; color: #5b5f56; cursor: pointer; } .ed-add[hidden] { display: none; }
.ed-tools, .ed-addrow { display: flex; gap: 6px; flex-wrap: wrap; } .ed-tools[hidden] { display: none; }
.ed-tools button:first-child { min-height: 42px; padding: 0 16px; font-size: 14px; background: var(--ink); } .ed-tools button:disabled { opacity: .4; }
.ed-blocks { display: grid; gap: 10px; }
.ed-b { display: grid; grid-template-columns: 52px 1fr auto; gap: 10px; align-items: start; animation: rise .5s var(--ease); }
.ed-b > span { padding-top: 13px; font-size: 12.5px; color: #7d7a72; } .ed-b.h input { font-weight: 700; font-size: 18px; }
.ed-b > div { display: flex; gap: 4px; } .ed-b button { width: 40px; height: 44px; padding: 0; background: none; color: #6b665c; box-shadow: inset 0 0 0 1px rgba(37, 41, 35, .16); border-radius: 10px; font-size: 14px; } .ed-b button:disabled { opacity: .3; }
.ed-side { position: sticky; top: 96px; display: grid; gap: 14px; opacity: 0; transition: opacity .8s var(--ease) .2s; } .adm.in .ed-side { opacity: 1; }
.ed-side-h { margin: 0; font-size: 13px; color: #7d7a72; }
.ed-pv { display: grid; grid-template-columns: 1fr; gap: 18px; padding: 0; max-width: none; margin: 0; }
.ed-pv .pop-card.first { grid-column: auto; grid-row: auto; display: block; } .ed-pv .first .pc-img { aspect-ratio: 4 / 3.4; height: auto; min-height: 0; clip-path: none; }
.ed-pv .first .fr-pic { inset: 20px 20px 104px; } .ed-pv .first .frame .pc-over { padding: 0 20px 18px; gap: 12px; } .ed-pv .first .frame .pc-over .pc-rank { font-size: 64px; } .ed-pv .pc-over strong { font-size: 19px; }
.ed-pv .fr-pic img, .ed-pv .st-tape { transition: none; } .ed-pv .st-tape { transform: rotate(-38deg); }
.ed-pv-list { display: block; padding: 0; margin: 0; max-width: 260px; list-style: none; } .ed-pv-list li { opacity: 1 !important; transform: none !important; list-style: none; }
.ph.mo.none { display: grid; place-items: center; background: var(--beige); color: #8a877f; font-size: 13px; }
.ed-save { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; padding-top: 14px; border-top: 1px solid rgba(37, 41, 35, .16); }
.ed-save .msg { flex: 1 1 100%; text-align: right; min-height: 1.4em; } .ed-save button:last-child { background: var(--ink); min-height: 50px; }
@media (max-width: 900px) {
  .adm { padding: 100px 16px 120px; } .adm-stats { grid-template-columns: 1fr 1fr; }
  .adm-edit { grid-template-columns: 1fr; } .ed-side { position: static; }
  .ed-save { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(248, 246, 241, .94); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
  .adm-list li { flex-wrap: wrap; } .al-btn { margin-left: auto; } .al-ph { width: 64px; }
  .ed-photos .thumbs button, .ed-add { flex: 1 1 0; max-width: 88px; } .ed-b { grid-template-columns: 1fr auto; } .ed-b > span { display: none; }
  .adm-who { display: none; }
}
@media (prefers-reduced-motion: reduce) { .adm .ln > span, .adm-stats div, .adm-list li, .ed-main, .ed-side, .adm-login .form { opacity: 1; transform: none; transition: none; animation: none; } }
.ed-pv-list a { display: grid; gap: 7px; } .ed-pv-list .ph { aspect-ratio: 4 / 3; border-radius: 4px; }

/* ── 관리 화면: 가로로 퍼지지 않게 가운데로 모은다. 글 쓰는 칸은 읽기 편한 폭(약 680px), 미리보기는 그 옆에 좁게 ── */
.adm { max-width: 1040px; }
.adm-login { max-width: 520px; }
.adm-edit { max-width: 1120px; grid-template-columns: minmax(0, 680px) minmax(0, 340px); justify-content: space-between; gap: 40px 48px; }
.ed-side, .ed-pv, .ed-pv > * { min-width: 0; }
.ed-pv-list { max-width: none; }
.adm-stats { gap: 8px; margin: 26px 0 20px; } .adm-stats div { padding: 12px 16px; } .adm-stats b { font-size: 28px; }
.adm-h { font-size: clamp(40px, 5vw, 68px); }
.ed-title { font-size: clamp(28px, 3vw, 40px); }
.ed-b { grid-template-columns: 1fr auto; } .ed-b > span { display: none; }      /* 「소제목 · 문단」 이름표는 칸 안의 안내 글로 충분하다 */
.ed-b textarea { min-height: 150px; line-height: 1.7; }
@media (max-width: 900px) { .adm-edit { grid-template-columns: 1fr; } }
.pv-cap { margin: 0; font-size: 13px; line-height: 1.6; color: #6b665c; } .pv-cap b { display: block; font-size: 14px; color: var(--ink); margin-bottom: 2px; }
.ed-pv .pv-cap + .pop-card, .ed-pv .pv-cap + .ed-pv-list { margin-top: -8px; }

/* 글 쓰기 미리보기: 글을 열었을 때의 화면을 작게 줄여 보여 준다(왼쪽 대표 사진 · 오른쪽 글) */
.pv-screen { position: relative; overflow: hidden; border-radius: 10px; background: var(--paper); box-shadow: 0 0 0 1px rgba(37, 41, 35, .16), 0 14px 30px -18px rgba(40, 30, 14, .5); }
.pv-scr { display: flex; width: 900px; height: 520px; transform-origin: 0 0; }
.pv-ph { flex: 0 0 46%; display: grid; place-items: center; background: var(--beige) center / cover; color: #8a877f; font-size: 22px; }
.pv-art { position: relative; flex: 1; min-width: 0; overflow-y: auto; overscroll-behavior: contain; padding: 70px 44px 50px; overflow-wrap: anywhere; scrollbar-width: thin; }
.pv-x { position: absolute; right: 22px; top: 18px; padding: 9px 16px; border-radius: 99px; background: var(--beige); font-size: 13px; font-weight: 600; }
.pv-art .tag { font-size: 14px; }
.pv-art h3 { margin: 12px 0 14px; font-family: var(--serif); font-weight: 600; font-size: 36px; line-height: 1.18; letter-spacing: -.035em; }
.pv-sum { margin: 0 0 10px; font-size: 17px; line-height: 1.65; color: #4d5249; }
.pv-meta { margin: 0 0 22px; padding-bottom: 18px; border-bottom: 1px solid rgba(37, 41, 35, .16); font-size: 13px; color: #7a7d74; }
.pv-art .gal { margin: 0 0 22px; }
.pv-art h4 { margin: 28px 0 8px; font-size: 20px; letter-spacing: -.03em; } .pv-art p { margin: 0 0 12px; font-size: 16.5px; line-height: 1.8; }
.pv-empty { color: #9a968d; } .pv-tags { margin-top: 24px !important; } .pv-tags span { margin-right: 10px; font-size: 14px; color: var(--accent); }
.pv-cm { margin-top: 30px !important; padding-top: 18px; border-top: 1px solid rgba(37, 41, 35, .16); font-weight: 700; font-size: 20px !important; }
.ed-side { max-height: calc(100svh - 110px); overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; scrollbar-width: thin; }
.ed-save { position: sticky; bottom: 0; background: var(--paper); padding-bottom: 6px; }
@media (max-width: 1100px) { .adm-edit { grid-template-columns: 1fr; } .ed-side { position: static; max-height: none; overflow: visible; } }
@media (max-width: 900px) { .ed-save { position: fixed; } }

/* 댓글 비밀번호 · 고치기 · 지우기 */
.cm-acts { display: flex; gap: 14px; } .re-form .row { grid-template-columns: 1fr 1fr; gap: 8px; }
.re-ask { margin: 0 !important; font-size: 14px !important; }
.r-cm .list li > .re-form { grid-column: 2; } .re-list li > .re-form { grid-column: 1 / -1; }
/* 글 쓰기: 미리보기 칸을 넓힌다(옆 여백을 쓴다) */
.adm-edit { max-width: 1400px; grid-template-columns: minmax(0, 680px) minmax(0, 600px); }
@media (max-width: 1100px) { .adm-edit { grid-template-columns: 1fr; } }
#home-msg { display: block; margin: 14px 0 0; font-size: 14.5px; } #home-msg:empty { display: none; } #home-msg a { margin-left: 8px; font-weight: 600; border-bottom: 1px solid currentColor; }

/* 댓글 칸을 가로로 퍼지지 않게: 쓰는 칸은 620px, 고치기 · 지우기 · 답글 칸은 440px 까지 */
.r-cm > .form { max-width: 620px; } .r-cm .list { max-width: 720px; }
.re-form { max-width: 440px; padding: 10px; gap: 6px; }
.re-form .row.end { grid-template-columns: 1fr auto; } .re-form button { min-height: 40px; padding: 0 16px; }
.re-go { display: grid; grid-template-columns: 1fr auto; gap: 6px; } .re-form .msg:empty { display: none; } .re-form .msg { font-size: 13px; }
.re-form input { min-height: 40px; padding: 8px 12px; font-size: 16px; } .re-form textarea { padding: 10px 12px; }
/* 기본 사진 고르기 */
.ed-stock[hidden] { display: none; } .ed-stock p { margin: 0 0 8px; font-size: 13.5px; color: #5b5f56; } .ed-stock small { margin-left: 6px; color: var(--accent); font-weight: 600; }
.ed-stock > div { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.ed-stock button { aspect-ratio: 4 / 3; padding: 0; border-radius: 8px; background: var(--beige) center / cover; transition: transform .25s var(--ease), opacity .25s; }
.ed-stock button:disabled { opacity: .3; } @media (hover: hover) { .ed-stock button:not(:disabled):hover { transform: scale(1.04); } }

/* 띄어쓰기 없는 긴 글자(시험 글 · 주소 등)가 칸을 밀어내지 않게: 넘칠 때만 글자 사이에서 줄을 바꾼다 */
body { overflow-wrap: anywhere; }
.latest, .grid, .lead { min-width: 0; } .latest li, .latest a, .g-card, .pop-card, .pc-txt, .r-in, .r-in > * { min-width: 0; max-width: 100%; }
@media (max-width: 760px) { .latest { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ── 휴대폰 글 읽기: 사진을 위에 붙박아 두지 않는다. 사진도 글과 함께 밀려 올라가서 화면 전체로 글을 읽는다 ── */
@media (max-width: 760px) {
  .reader { overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  .reader.on { background: var(--paper); transition: background 0s .55s; }
  .r-strips { position: fixed; }
  .r-photo { position: relative; width: 100%; height: auto; aspect-ratio: 4 / 3; max-height: 62svh; }
  .r-body { position: relative; left: 0; right: 0; top: 0; bottom: auto; overflow: visible; padding: 18px 16px calc(70px + env(safe-area-inset-bottom)); }
  .r-in { padding-top: 6px; }
  .r-cm > .form, .r-cm .list, .re-form { max-width: none; }
}

/* 본문 사이에 넣은 사진: 한 장씩, 자르지 않고. 세로 사진은 화면보다 길어지지 않게 폭을 줄인다 */
.r-img, .pv-img { margin: 22px 0; width: min(100%, calc(78svh * var(--ar, 1.33))); aspect-ratio: var(--ar, auto); overflow: hidden; border-radius: 8px; background: var(--beige); }
.r-img img, .pv-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pv-img { width: 100%; aspect-ratio: auto; } .pv-img img { height: auto; }
.ed-imgpick { padding: 12px; border-radius: 10px; background: var(--beige); } .ed-imgpick span { display: block; margin-bottom: 8px; font-size: 13px; color: #6b665c; }
.ed-imgpick > div { display: flex; gap: 6px; } .ed-imgpick button { width: 72px; height: 72px; padding: 0; border-radius: 8px; background: var(--paper) center / cover; opacity: .45; box-shadow: none; }
.ed-imgpick button[aria-pressed="true"] { opacity: 1; box-shadow: 0 0 0 2px var(--beige), 0 0 0 4px var(--ink); }

/* 첫 화면 머리줄 아래 한 줄: 독립형 라이프스타일 저널 */
.tagline { position: absolute; z-index: 4; left: calc(var(--gut) + 22px); top: calc(84px + env(safe-area-inset-top)); margin: 0; display: flex; align-items: center; gap: 9px; font-size: 13.5px; font-weight: 500; letter-spacing: .04em; opacity: .8; }
.tagline::before { content: ""; width: 18px; height: 1px; background: currentColor; }
.brand small { letter-spacing: .06em; font-size: 11px; }
@media (max-width: 760px) { .tagline { position: static; padding: 0 0 0 36px; margin: 2px 0 4px; font-size: 13px; } }
@media (min-width: 761px) { .tagline { display: none; } }   /* 큰 화면은 머리줄의 이름 옆에 이미 적혀 있다 */

/* ── 글 쓰기 미리보기 다시: 탭으로 하나씩, 흰 종이 위에 따로 ── */
.pv-tabs { display: flex; gap: 6px; }
.pv-tabs button { min-height: 40px; padding: 0 15px; background: none; color: var(--ink); font-size: 13.5px; font-weight: 500; box-shadow: inset 0 0 0 1px rgba(37, 41, 35, .2); }
.pv-tabs button[aria-pressed="true"] { background: var(--ink); color: var(--paper); box-shadow: none; }
.ed-pv .pv-cap { margin: -6px 0 -4px; font-size: 13.5px; }
.pv-pane { padding: 22px; border-radius: 18px; background: #fff; box-shadow: 0 0 0 1px rgba(37, 41, 35, .12), 0 18px 34px -24px rgba(40, 30, 14, .45); min-width: 0; }
.pv-pane.is-card { display: grid; justify-items: center; } .pv-pane.is-card .ed-pv-list { width: min(100%, 300px); }
.pv-pane.is-card .ph.mo { border-radius: 4px; overflow: hidden; }
.pv-pane.is-frame .pop-card { display: block; max-width: 460px; margin: 0 auto; opacity: 1; transform: none; }
.pv-pane .pv-art { position: static; padding: 0; overflow: visible; }
.pv-cover { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; margin-bottom: 20px; background: var(--beige); }
.pv-cover.none { display: grid; place-items: center; color: #8a877f; font-size: 14px; }
.pv-pane .pv-art h3 { font-size: 30px; margin: 10px 0 12px; }
.pv-pane .pv-art p { font-size: 16.5px; line-height: 1.8; } .pv-pane .pv-art h4 { font-size: 20px; margin: 26px 0 8px; }
.pv-pane .pv-img { margin: 20px 0; border-radius: 8px; }
/* 미리보기 칸이 구역(.block)의 두 칸 배치를 물려받아 내용이 옆으로 겹치던 것: 한 줄로 쌓는다 */
#pv { display: flex; flex-direction: column; gap: 14px; padding: 0; margin: 0; max-width: none; }
#pv::before { display: none; } #pv > * { min-width: 0; } #pv .pv-cap { margin: 0; }

/* ── 댓글 영역 다시: 쓰는 칸이 위, 목록이 아래. 베이지 덩어리 대신 흰 칸 + 가는 테두리로 가볍게 ── */
.r-cm { display: flex; flex-direction: column; max-width: 720px; }
.r-cm > h2 { order: 0; margin-bottom: 14px; } .r-cm > .form { order: 1; } .r-cm .list { order: 2; margin: 22px 0 0; max-width: none; }
.r-cm > .form { max-width: none; padding: 14px; gap: 10px; border-radius: 16px; background: #fff; box-shadow: inset 0 0 0 1px rgba(37, 41, 35, .14); }
.r-cm > .form label { gap: 5px; font-size: 12.5px; color: #6b665c; }
.r-cm > .form input, .r-cm > .form textarea, .re-form input, .re-form textarea { background: #f4f1ea; border: 0; border-radius: 10px; }
.r-cm > .form .row { grid-template-columns: 1fr 1fr; gap: 10px; }
.r-cm > .form button { min-height: 44px; padding: 0 22px; font-size: 14.5px; }
.r-cm .list > li { padding: 18px 0; } .r-cm .list > li:first-child { border-top: 1px solid rgba(37, 41, 35, .14); }
.r-cm .list b { font-size: 15px; } .r-cm .list p { margin: 4px 0 2px; }
.cm-acts { gap: 16px; margin-top: 2px; } .cm-re { font-size: 13px; }
.re-form { max-width: none; margin-top: 10px; padding: 12px; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1px rgba(37, 41, 35, .14); }
.re-form .msg { color: #a13a2a; }
.nopw [name=pw], .nopw label:has([name=pw]), .nopw [data-ed], .nopw:not(.is-adm) [data-rm] { display: none; }
.nopw .row { grid-template-columns: 1fr !important; }
/* 글 쓰기: 미리보기 칸을 화면 오른쪽 끝까지 넓힌다 */
.adm-edit { max-width: 1760px; grid-template-columns: minmax(0, 640px) minmax(0, 1fr); }
.pv-pane.is-card .ed-pv-list { width: min(100%, 340px); } .pv-pane.is-frame .pop-card { max-width: 620px; }
.pv-pane .pv-art { max-width: 760px; margin: 0 auto; }
@media (max-width: 1100px) { .adm-edit { grid-template-columns: 1fr; } }

/* 머리줄 이름: 독립형 라이프스타일 저널 */
.top .brand b { white-space: nowrap; font-size: 20px; letter-spacing: -.04em; }
@media (max-width: 760px) { .top .brand b { font-size: 17.5px; } .top, body[data-past="1"] .top { padding-left: 18px; gap: 8px; } .write { padding: 0 13px; } }
@media (max-width: 370px) { .top .brand b { font-size: 16px; } }
.nopw .row.end { grid-template-columns: 1fr auto !important; }

/* 댓글: 목록이 위, 쓰는 칸이 아래. 사이트에서는 누구든(관리자도) 비밀번호가 맞아야 고치고 지운다 — 관리자는 관리 화면에서 지운다 */
.r-cm .list { order: 1; margin: 0 0 22px; } .r-cm > .form { order: 2; }
.r-cm .list > li:first-child { border-top: 0; padding-top: 6px; }
.nopw [data-rm] { display: none !important; }

/* 본문 사진 칸: 안내 글 아래에 작은 사진들. 끌면 떠오르고, 올려놓을 칸은 테두리가 켜지고, 합쳐지면 톡 튄다 */
.ed-b > .ed-imgpick { display: block; min-width: 0; cursor: grab; transition: box-shadow .2s, transform .25s var(--ease), background .2s; }
.ed-imgpick span { line-height: 1.5; } .ed-imgpick span b { color: var(--ink); font-size: 13px; }
.ed-imgpick > div { flex-wrap: wrap; }
.ed-b.dragging { opacity: .45; } .ed-b.dragging .ed-imgpick { transform: scale(.98); }
.ed-b.drop .ed-imgpick { background: #dfe6dc; box-shadow: 0 0 0 2px var(--accent); transform: scale(1.015); }
.ed-b.merged .ed-imgpick { animation: merge .6s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes merge { 0% { transform: scale(.94); box-shadow: 0 0 0 3px var(--accent); } 100% { transform: none; box-shadow: 0 0 0 0 transparent; } }
.r-in .gal { margin: 24px 0; } .pv-pane .gal { margin: 20px 0; }

/* 댓글 칸: 안내 글자(흐린 글자)는 한 가지 크기 · 색으로, 칸 밖으로 잘리지 않게 짧게 */
.r-cm input::placeholder, .r-cm textarea::placeholder { font-size: 15px; color: #9a968d; opacity: 1; }
.r-cm > .form .row.end, .r-cm .re-form .row.end { grid-template-columns: 1fr auto !important; align-items: center; }
.cm-tip { font-size: 12.5px; line-height: 1.45; color: #8a877f; } .msg:not(:empty) + .cm-tip { display: none; } .msg:empty { display: none; }
.nopw .cm-tip { display: none; }
.r-cm > .form .msg { color: #a13a2a; font-size: 13px; }

/* 카테고리 페이지: 글이 한두 편뿐일 때 카드가 화면 폭만큼 커지지 않게 — 한 칸은 최대 440px, 왼쪽부터 채운다 */
@media (min-width: 761px) { .cat-main .grid { grid-template-columns: repeat(auto-fill, minmax(320px, 440px)); justify-content: start; } .cat-main .g-card { max-width: none; } }

/* 카테고리 페이지: 큰 화면은 한 줄에 네 칸(글이 한 편이어도 한 칸 크기 그대로). 좁아지면 세 칸 · 두 칸 */
@media (min-width: 761px) { .cat-main .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 44px 24px; justify-content: stretch; } }
@media (min-width: 1000px) { .cat-main .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1300px) { .cat-main .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.cv { cursor: pointer; }
/* 표지가 놓인 무대(.stage)가 뒤쪽 표지를 가려 눌리지 않던 것: 무대는 누름을 받지 않고 표지만 받는다 */
.stage, .ring { pointer-events: none; } .cv { pointer-events: auto; }

/* ── 안내 문서(개인정보처리방침 · 이용약관) ── */
.doc-top, body[data-past="1"] .doc-top { grid-template-columns: auto 1fr auto; }
.doc { max-width: 760px; margin: 0 auto; padding: 130px var(--gut) 110px; color: var(--ink); }
.doc h1 { margin: 12px 0 6px; font-family: var(--serif); font-weight: 400; font-size: clamp(38px, 5vw, 60px); letter-spacing: -.035em; line-height: 1.1; }
.doc-date { margin: 0 0 30px; font-size: 13px; color: #7d7a72; }
.doc h2 { margin: 38px 0 10px; font-size: 19px; letter-spacing: -.02em; }
.doc p, .doc li { font-size: 16px; line-height: 1.8; } .doc p { margin: 0 0 12px; } .doc ul { margin: 0 0 12px; padding-left: 20px; }
.doc table { width: 100%; border-collapse: collapse; margin: 6px 0 14px; font-size: 14.5px; line-height: 1.6; }
.doc th, .doc td { padding: 10px 12px; border-top: 1px solid rgba(37, 41, 35, .16); text-align: left; vertical-align: top; } .doc th { font-size: 13px; color: #6b665c; white-space: nowrap; }
.doc mark { background: #f4e3a1; padding: 1px 4px; border-radius: 3px; }
.doc-links { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 50px !important; padding-top: 20px; border-top: 1px solid rgba(37, 41, 35, .16); font-size: 14px !important; }
.doc-links a { border-bottom: 1px solid currentColor; }
@media (max-width: 760px) { .doc { padding-top: 104px; } .doc table, .doc tbody, .doc tr, .doc td { display: block; } .doc th { display: none; } .doc tr { padding: 10px 0; border-top: 1px solid rgba(37, 41, 35, .16); } .doc td { padding: 2px 0; border: 0; } .doc td:first-child { font-weight: 600; } }

/* ── 컴퓨터 글 읽기: 사진이 화면을 덮을 만큼 크게 잘려 보이던 것 ──
   왼쪽 사진 칸을 좁히고(38%), 사진은 자르지 않고 종이 바탕 위에 통째로 놓는다(인기 게시물 액자와 같은 결). 본문 사진 묶음도 폭을 묶는다 */
@media (min-width: 761px) {
  .r-photo { width: 38vw; background: #E4DBCB; display: grid; place-items: center; padding: clamp(22px, 3vw, 48px); box-shadow: inset 0 0 0 1px rgba(37, 41, 35, .08); }
  .r-photo img, .reader.on .r-photo img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; transform: none; border: 7px solid #fbfaf6; border-radius: 2px; box-shadow: 0 1px 2px rgba(40, 30, 14, .28), 0 24px 40px -18px rgba(40, 30, 14, .5); }
  .r-body { left: 38vw; }
  .r-in .gal { max-width: 720px; }
  .r-in .gal-row.solo .gal-item { width: min(100%, calc(56svh * var(--ar))); }
}
@media (min-width: 761px) {
  .r-photo { display: block; padding: 0; --pad: clamp(22px, 3vw, 48px); }
  .r-photo img, .reader.on .r-photo img { position: absolute; inset: var(--pad); margin: auto; box-sizing: border-box; max-width: calc(100% - var(--pad) * 2); max-height: calc(100% - var(--pad) * 2); }
}

/* 글 읽기 왼쪽 사진에도 테이프와 스티커(큰 화면). 사진이 자리 잡은 뒤에 톡 붙는다 */
.r-deco { display: none; }
@media (min-width: 761px) {
  .r-photo .r-deco { display: block; position: absolute; z-index: 2; pointer-events: none; }
  .r-photo .st-tape { left: calc(var(--il) - 30px); top: calc(var(--it) + 20px); width: 118px; height: 30px; transform: rotate(-38deg) scaleX(0); transition: transform .5s var(--ease) .75s; }
  .reader.on .r-photo .st-tape { transform: rotate(-38deg); }
  .r-photo .st { left: calc(var(--il) + var(--iw) - 52px); top: calc(var(--it) + var(--ih) - 52px); right: auto; bottom: auto; width: 84px; height: 84px; border-width: 5px; transform: rotate(12deg) scale(0); transition: transform .55s cubic-bezier(.34, 1.56, .64, 1) .9s; }
  .reader.on .r-photo .st { transform: rotate(12deg); }
  .reader:not(.on) .r-photo .r-deco { transition-duration: .15s; transition-delay: 0s; }
}
