/* 짤창고 — 밤에 보는 짤 갤러리. 남보라 밤하늘 바탕, 사진은 원래 비율 그대로 벽돌 쌓기.
   큰 표정 두 가지: 노랑·분홍이 어긋나게 찍힌 로고(리소 인쇄 느낌)와 '인기 10' 큰 외곽선 숫자. */
:root {
  --night: #15112b;
  --deep: #0e0b1f;
  --card: #211b42;
  --card2: #2a2352;
  --ink: #f3f0ff;
  --sub: #9c95c8;
  --hi: #ffe14d;
  --pink: #ff5fa2;
  --cyan: #3ee6ff;
  --display: 'Black Han Sans', Pretendard, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; word-break: keep-all; overflow-wrap: break-word; }
body {
  margin: 0; color: var(--ink); font: 15px/1.65 Pretendard, -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  background: radial-gradient(1200px 600px at 80% -10%, #2c1f5c 0, transparent 60%), radial-gradient(900px 500px at -10% 10%, #1b2458 0, transparent 55%), var(--night);
  background-attachment: fixed;
}
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--hi); outline-offset: 2px; border-radius: 6px; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 18px; }
.none { color: var(--sub); }

/* 머리 */
.hd { position: sticky; top: 0; z-index: 10; background: rgba(14, 11, 31, .82); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(255, 255, 255, .06); }
.hd-in { display: flex; align-items: center; gap: 14px 28px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
.logo { position: relative; isolation: isolate; font: 32px/1 var(--display); color: var(--hi); letter-spacing: -1px; }
.logo::before { content: attr(data-t); position: absolute; left: 3px; top: 3px; color: var(--pink); z-index: -1; mix-blend-mode: screen; }
.cats { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.cats::-webkit-scrollbar { display: none; }
.cats a { flex: none; padding: 6px 14px; border-radius: 999px; font-weight: 700; color: var(--sub); }
.cats a:hover { color: var(--ink); background: rgba(255, 255, 255, .06); }
.cats a.on { color: var(--deep); background: var(--hi); }
.today { margin: 0; font-size: 13px; color: var(--sub); }
.today b { color: var(--cyan); }

main { padding: 22px 0 60px; min-height: 70vh; }
.sec { font: 26px/1.2 var(--display); margin: 26px 0 14px; letter-spacing: -.5px; }
.sec.big { font-size: 40px; margin-top: 10px; }

/* 인기 10 레일 */
.rail { list-style: none; margin: 0; padding: 4px 0 10px; display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--card2) transparent; }
.rail li { flex: none; scroll-snap-align: start; }
.rail a { position: relative; display: grid; grid-template-columns: 70px 150px; grid-template-rows: auto auto; align-items: end; }
.rk { grid-row: 1; grid-column: 1; font: 130px/0.8 var(--display); color: var(--night); -webkit-text-stroke: 2px var(--sub); text-align: right; margin-right: -22px; z-index: 0; }
.rail li:nth-child(-n+3) .rk { -webkit-text-stroke-color: var(--hi); }
.poster { grid-row: 1; grid-column: 2; position: relative; z-index: 1; height: 200px; border-radius: 12px; overflow: hidden; background: var(--card2); box-shadow: 0 10px 30px rgba(0, 0, 0, .45); }
.poster img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.rail a:hover .poster img { transform: scale(1.05); }
.ptxt { display: flex; align-items: flex-end; height: 100%; padding: 12px; font: 20px/1.25 var(--display); background: linear-gradient(160deg, var(--pink), #7b3cff); }
.pt { grid-row: 2; grid-column: 2; font-size: 13px; color: var(--sub); padding-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail a:hover .pt { color: var(--ink); }

/* 벽돌 쌓기 */
.masonry { columns: 4 260px; column-gap: 14px; }
.tile { position: relative; display: block; break-inside: avoid; margin-bottom: 14px; border-radius: 14px; overflow: hidden; background: var(--card); }
.tile img { display: block; width: 100%; height: auto; transition: transform .3s, filter .3s; }
.tile:hover img { transform: scale(1.03); filter: brightness(1.08); }
.tile .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 14px 12px; background: linear-gradient(transparent, rgba(10, 8, 24, .92)); }
.tt { display: block; font-weight: 800; font-size: 15px; line-height: 1.35; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
.mt { display: block; margin-top: 3px; font-size: 12px; color: var(--sub); }
.mt em { font-style: normal; font-weight: 800; color: var(--deep); background: var(--hi); padding: 0 5px; border-radius: 3px; margin-right: 6px; font-size: 10px; }
.tile.txt { min-height: 180px; padding: 18px 16px 52px; }
.tile.txt .cap { position: static; padding: 0; background: none; }
.tile.txt .tt { font: 24px/1.25 var(--display); text-shadow: none; }
.tile.txt .mt { position: absolute; left: 16px; bottom: 14px; }
.t0 { background: linear-gradient(150deg, #ff5fa2, #7b3cff); }
.t1 { background: linear-gradient(150deg, #3ee6ff, #3456ff); }
.t2 { background: linear-gradient(150deg, #ffe14d, #ff8a3d); color: var(--deep); }
.t2 .mt { color: rgba(14, 11, 31, .7); }

.pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 20px; }
.pagination a, .pagination strong, .pagination .gap { min-width: 38px; padding: 7px 12px; text-align: center; border-radius: 999px; background: var(--card); font-weight: 700; }
.pagination strong { background: var(--hi); color: var(--deep); }
.pagination .gap { background: none; }

/* 읽기 */
.read { max-width: 760px; margin: 0 auto; padding: 0 18px; }
.chip { display: inline-block; font-size: 13px; font-weight: 800; color: var(--deep); background: var(--hi); padding: 3px 12px; border-radius: 999px; }
.rh h1 { font: clamp(28px, 5vw, 46px)/1.15 var(--display); margin: 14px 0 10px; letter-spacing: -1px; text-wrap: balance; }
.meta { font-size: 13px; color: var(--sub); margin: 0 0 24px; }
.meta a { text-decoration: underline; }
.body { font-size: 17px; line-height: 1.8; overflow-wrap: anywhere; }
.body img { display: block; max-width: 100%; height: auto; margin: 16px auto; border-radius: 14px; }
.body a { color: var(--cyan); text-decoration: underline; }
.nx { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 34px; }
.nx a { background: var(--card); border-radius: 14px; padding: 14px 16px; font-weight: 700; transition: background .2s; }
.nx a:hover { background: var(--card2); }
.nx a.r { text-align: right; }
.nx small { display: block; font-weight: 600; color: var(--hi); font-size: 12px; margin-bottom: 2px; }

/* 키워드 링크 묶음 — 네온 테두리 메모 (광고 표시 없음) */
.pl { margin: 22px 0; font-size: 15px; }
.pl p { margin: 4px 0; }
.pl a { color: var(--hi); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.pl-g { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; margin: 0 0 10px; }
.pl-g a { display: block; }
.body .pl-g img { width: 100%; height: auto; aspect-ratio: 4 / 1; object-fit: cover; margin: 0; border-radius: 10px; }
.pl-q { padding: 14px 18px; border-radius: 14px; background: rgba(62, 230, 255, .06); border: 1px solid rgba(62, 230, 255, .35); box-shadow: 0 0 24px rgba(62, 230, 255, .08) inset; }
.pl-n { padding: 14px 18px; border-radius: 14px; background: var(--card); }

.nf { text-align: center; padding: 60px 0; }
.big404 { font: 140px/1 var(--display); margin: 0; color: var(--pink); -webkit-text-stroke: 2px var(--hi); }
.nf a { color: var(--hi); text-decoration: underline; }
.ft { border-top: 1px solid rgba(255, 255, 255, .06); padding: 22px 0 34px; font-size: 12px; color: var(--sub); }
.ft p { margin: 0; }

@media (max-width: 700px) {
  .masonry { columns: 2; column-gap: 8px; }
  .tile { margin-bottom: 8px; border-radius: 10px; }
  .tt { font-size: 13px; }
  .tile.txt .tt { font-size: 18px; }
  .rail a { grid-template-columns: 46px 118px; }
  .rk { font-size: 92px; margin-right: -14px; }
  .poster { height: 158px; }
  .today { display: none; }
  .nx { grid-template-columns: 1fr; }
  .wrap { padding: 0 12px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.hl { margin: 0; font: inherit; }
