/* 비북스 프로그램 아카이브 페이지 (/talks/ /bam/ /box/) 공통 스타일 */
:root {
  --paper: #f7faf0; --card: #ffffff; --ink: #26330f; --ink-2: #435028; --muted: #6f7d57; --line: #d6e0c2;
  --stamp: #4E6813; --head: #4E6813; --c: #5f8420;
  --serif: 'Gowun Batang', 'Noto Serif KR', 'AppleMyungjo', serif;
  --mono: 'Courier Prime', 'Courier New', monospace;
  --display: 'Fraunces', Georgia, serif;
}
body.dark {
  --head: #eef3e0;
  --paper: #15200a; --card: #1e2d10; --ink: #eef3e0; --ink-2: #c3d0a5; --muted: #8fa070; --line: #3a4d22; --stamp: #c9dc8a;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { background: var(--paper); color: var(--ink); font-family: var(--serif); font-size: 16px; line-height: 1.7; word-break: keep-all; overflow-wrap: break-word; overflow-x: hidden; }
body::before { display: none; }
body.dark::before { display: none; }
body.dark { background-image: radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,.35), transparent), radial-gradient(1px 1px at 70% 12%, rgba(255,255,255,.25), transparent), radial-gradient(1.5px 1.5px at 85% 60%, rgba(255,255,255,.2), transparent), radial-gradient(1px 1px at 40% 80%, rgba(255,255,255,.2), transparent); background-attachment: fixed; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { color: var(--head); }
img { display: block; max-width: 100%; height: auto; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 28px; }
.label { font-family: var(--mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }

/* top */
.top { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 14px; height: 58px; }
.logo { font-family: var(--display); font-weight: 800; font-size: 23px; letter-spacing: -.02em; white-space: nowrap; color: var(--head); }
.logo small { font-family: var(--serif); font-weight: 400; font-size: 13px; color: var(--ink-2); margin-left: 6px; }
.switch { display: flex; gap: 4px; font-family: var(--mono); font-size: 13px; overflow-x: auto; scrollbar-width: none; }
.switch a { padding: 5px 10px; border: 1px solid transparent; color: var(--ink-2); white-space: nowrap; }
.switch a:hover { color: var(--ink); }
.switch a.on { border-color: var(--c); color: var(--ink); }

/* hero */
.hero { padding: 60px 0 20px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 54px; align-items: center; }
.hero .en { font-family: var(--mono); font-size: 13px; letter-spacing: .14em; color: var(--c); font-weight: 700; text-transform: uppercase; }
.hero h1 { font-size: clamp(34px, 4.8vw, 58px); line-height: 1.22; letter-spacing: -.035em; margin: 12px 0 18px; }
.hero .intro { font-size: 17px; color: var(--ink-2); max-width: 32em; }
.facts { margin-top: 28px; border-top: 2px solid var(--ink); }
.facts div { display: grid; grid-template-columns: 96px 1fr; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.facts dt { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; color: var(--muted); padding-top: 2px; }
.facts dd { font-size: 15px; }
.print { background: #ffffff; padding: 10px 10px 34px; position: relative; transform: rotate(1.4deg); box-shadow: 0 1px 1px rgba(31,47,14,.08), 0 18px 34px -16px rgba(0,0,0,.45); }
.print img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; filter: saturate(.92); }
.print figcaption { position: absolute; left: 12px; bottom: 9px; font-family: var(--mono); font-size: 12px; color: #6f7d57; }
.print::before { content: ""; position: absolute; top: -12px; left: 50%; width: 100px; height: 24px; transform: translateX(-50%) rotate(-2deg); background: rgba(205,224,150,.82); }

/* next (coming soon / open) */
.next { margin-top: 70px; position: relative; border: 2px solid var(--ink); background: var(--card); padding: 34px 34px 32px; overflow: hidden; display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: center; }
.next::after { content: ""; position: absolute; inset: 8px; border: 1px dashed var(--line); pointer-events: none; }
.next .kicker { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 12.5px; letter-spacing: .14em; color: var(--c); font-weight: 700; text-transform: uppercase; }
.next .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 0 var(--c); animation: ping 1.8s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c) 60%, transparent); } 80%, 100% { box-shadow: 0 0 0 12px transparent; } }
.next h2 { font-size: clamp(26px, 3.2vw, 38px); letter-spacing: -.03em; line-height: 1.25; margin: 10px 0 10px; }
.next h2 .no { font-family: var(--display); color: var(--c); margin-right: 10px; }
.next p { color: var(--ink-2); max-width: 36em; }
.next .when { font-family: var(--mono); font-size: 14px; color: var(--ink); margin-top: 8px; }
.next .acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; position: relative; z-index: 1; }
.btn { display: inline-block; padding: 11px 18px; border: 1px solid var(--ink); font-family: var(--mono); font-size: 13.5px; transition: background .2s, color .2s; }
.btn:hover { background: var(--ink); color: var(--paper); }
.btn.solid { background: var(--c); border-color: var(--c); color: #fff; font-weight: 700; }
body.dark .btn.solid { color: #15200a; }
.btn.solid:hover { filter: brightness(1.08); background: var(--c); color: #fff; }
.stamp { position: relative; width: 168px; height: 168px; border-radius: 50%; border: 3px double var(--c); color: var(--c); display: grid; place-items: center; text-align: center; transform: rotate(-12deg); font-family: var(--mono); font-weight: 700; letter-spacing: .1em; line-height: 1.25; }
.stamp b { display: block; font-family: var(--display); font-size: 28px; letter-spacing: 0; font-weight: 800; }
.stamp span { font-size: 11px; }
.stamp.soon { animation: wobble 5s ease-in-out infinite; }
@keyframes wobble { 0%, 100% { transform: rotate(-12deg); } 50% { transform: rotate(-8deg) scale(1.03); } }

/* archive */
.archive { padding: 84px 0 20px; }
.arch-head { display: flex; justify-content: space-between; align-items: end; gap: 18px; border-bottom: 2px solid var(--ink); padding-bottom: 14px; margin-bottom: 10px; }
.arch-head h2 { font-size: clamp(28px, 3.4vw, 40px); letter-spacing: -.03em; line-height: 1.2; }
.arch-head h2 small { display: block; font-family: var(--mono); font-size: 12px; letter-spacing: .16em; color: var(--stamp); font-weight: 400; margin-bottom: 8px; }
.arch-head .count { font-family: var(--mono); font-size: 13px; color: var(--muted); text-align: right; }
.arch-head .count b { font-family: var(--display); font-size: 44px; color: var(--c); line-height: 1; display: block; }
.ep { display: grid; grid-template-columns: 260px 1fr; gap: 34px; padding: 34px 0; border-bottom: 1px solid var(--line); opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.ep.in { opacity: 1; transform: none; }
.ep .cover { position: relative; cursor: pointer; border: 0; padding: 0; background: none; text-align: left; }
.ep .cover img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; box-shadow: 0 14px 26px -16px rgba(0,0,0,.55); transition: transform .4s ease; }
.ep .cover:hover img { transform: rotate(-1deg) scale(1.02); }
.ep .cover .cnt { position: absolute; right: 8px; bottom: 8px; font-family: var(--mono); font-size: 11px; background: rgba(20,30,8,.8); color: #f6faea; padding: 2px 7px; }
.ep .no { font-family: var(--display); font-size: 34px; font-weight: 800; color: var(--c); line-height: 1; }
.ep .date { font-family: var(--mono); font-size: 13px; color: var(--muted); margin-top: 8px; }
.ep h3 { font-size: 25px; letter-spacing: -.025em; line-height: 1.35; margin: 6px 0 4px; }
.ep .meta { font-size: 14px; color: var(--muted); }
.ep .summary { margin-top: 14px; color: var(--ink-2); max-width: 38em; }
.thumbs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 20px; max-width: 560px; }
.thumbs button { position: relative; border: 0; padding: 0; cursor: pointer; background: var(--line); }
.thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: opacity .2s; }
.thumbs button:hover img { opacity: .85; }
.thumbs .more { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(20,30,8,.6); color: #f6faea; font-family: var(--mono); font-size: 14px; }

/* footer */
.foot { margin-top: 70px; border-top: 2px solid var(--ink); padding: 26px 0 50px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 14px; color: var(--ink-2); }
.foot a { border-bottom: 1px solid var(--line); }

/* lightbox */
.lb { position: fixed; inset: 0; z-index: 100; background: rgba(18,28,8,.95); color: #f7faf0; display: flex; flex-direction: column; }
.lb[hidden] { display: none; }
.lb-top { display: flex; align-items: center; gap: 14px; padding: 14px 18px; }
.lb-top > div { flex: 1; min-width: 0; }
.lb-no { font-family: var(--mono); font-size: 12px; color: #c9dc8a; margin-right: 10px; }
.lb-count { font-family: var(--mono); font-size: 12px; color: #aab98a; }
.lb-x { width: 40px; height: 40px; border: 1px solid #6b7a4f; background: transparent; color: inherit; font-size: 22px; cursor: pointer; }
.lb-track { flex: 1; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.lb-track::-webkit-scrollbar { display: none; }
.lb-track figure { flex: none; width: 100%; height: 100%; scroll-snap-align: center; display: flex; align-items: center; justify-content: center; padding: 0 16px 24px; }
.lb-track img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lb-arrow { position: absolute; top: 50%; width: 46px; height: 46px; margin-top: -23px; border: 1px solid #6b7a4f; background: rgba(18,28,8,.6); color: inherit; font-family: var(--mono); font-size: 18px; cursor: pointer; }
.lb-arrow.prev { left: 14px; } .lb-arrow.next { right: 14px; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero .print { max-width: 360px; }
  .next { grid-template-columns: 1fr; padding: 26px 22px; }
  .stamp { width: 130px; height: 130px; position: absolute; right: -10px; top: -10px; opacity: .9; }
  .stamp b { font-size: 21px; }
  .next h2, .next .kicker { padding-right: 96px; }
  .next .kicker { flex-wrap: wrap; row-gap: 2px; }
  .ep { grid-template-columns: 1fr; gap: 18px; }
  .ep .cover { max-width: 300px; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .logo small { display: none; }
  .switch { font-size: 12px; }
  .switch a { padding: 4px 7px; }
  .hero { padding-top: 36px; }
  .facts div { grid-template-columns: 76px 1fr; }
  .arch-head { flex-direction: column; align-items: start; }
  .arch-head .count { text-align: left; }
  .thumbs { grid-template-columns: repeat(4, 1fr); }
  .thumbs button:nth-child(n+5) { display: none; }
  .lb-arrow { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ep { opacity: 1; transform: none; transition: none; }
  .next .dot, .stamp.soon { animation: none; }
}
