/* 세라윤의 쓸모있는 덕질 — 모바일 우선, 외부 폰트·스크립트·애니메이션 없음 */
:root {
  --bg: #fbf8f3;
  --surface: #ffffff;
  --ink: #1c1b18;
  --muted: #6b655c;
  --line: #ebe4d8;
  --green: #1f4d3d;
  --green-soft: #e8f0ec;
  --gold: #b8945a;
  --gold-deep: #8d6c37;
  --gold-soft: #f6eedf;
  --night: #15201b;
  --night-2: #1e2c26;
  --warn: #9a3412;
  --warn-soft: #fff3ea;
  --r: 16px;
  --r-sm: 10px;
  --font: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.75;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--green); text-underline-offset: 3px; }
a:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { line-height: 1.35; letter-spacing: -0.025em; margin: 0; }
p { margin: 0; }
.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.wrap--read { max-width: 700px; }
.small { font-size: 0.86rem; color: var(--muted); line-height: 1.6; }

.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 12px; top: 12px; z-index: 20; background: var(--surface); padding: 8px 14px; border-radius: 8px; }

/* 검토본 리본 — 작게 */
.ribbon { background: var(--night); color: #e9dcc3; font-size: 0.78rem; text-align: center; padding: 6px 12px; letter-spacing: 0.01em; }
.ribbon a { color: #f1e2c3; }

/* 헤더 */
.site-header { background: rgba(251, 248, 243, 0.96); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.header-in { padding-top: 12px; padding-bottom: 8px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.02rem; letter-spacing: -0.02em; min-height: 40px; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 50%;
  display: inline-grid; place-items: center;
  background: var(--night); color: var(--gold);
  font-family: Georgia, "Times New Roman", serif; font-style: italic; font-size: 1rem;
}
.site-header nav ul { list-style: none; margin: 6px -20px 0; padding: 0 20px 4px; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.site-header nav ul::-webkit-scrollbar { display: none; }
.site-header nav a {
  display: inline-flex; align-items: center; white-space: nowrap;
  min-height: 40px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); text-decoration: none; font-size: 0.93rem;
}
.site-header nav a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: #fff; }

/* 공통 섹션 */
.section { padding: 44px 0 8px; }
.section--tight { padding: 28px 0 4px; }
.section-head { margin-bottom: 18px; }
.section-head h2 { font-size: 1.32rem; }
.section-head p { color: var(--muted); font-size: 0.95rem; margin-top: 6px; }
.eyebrow { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; color: var(--gold-deep); margin-bottom: 10px; }
.eyebrow--gold { color: var(--gold); }

/* 버튼 */
.btn {
  display: inline-flex; flex-direction: column; justify-content: center; align-items: center;
  min-height: 52px; padding: 10px 22px; border-radius: 999px;
  font-weight: 700; font-size: 1rem; text-decoration: none; text-align: center; line-height: 1.35;
}
.btn--block { display: flex; width: 100%; }
.btn--primary { background: var(--ink); color: #fff; }
.btn--gold { background: linear-gradient(180deg, #caa66a, var(--gold)); color: #1b160d; min-height: 64px; border-radius: var(--r); margin-top: 22px; }
.btn--ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); margin-top: 16px; }
.btn--clip { background: var(--night); color: #f3e6cc; min-height: 46px; padding: 8px 18px; font-size: 0.95rem; margin-top: 10px; }
.btn-sub { font-weight: 500; font-size: 0.8rem; opacity: 0.8; }

/* 히어로 */
.hero { padding: 36px 0 30px; }
.hero h1 { font-size: clamp(1.9rem, 7.6vw, 2.8rem); letter-spacing: -0.04em; line-height: 1.2; }
.hero h1::after { content: ""; display: block; width: 44px; height: 3px; background: var(--gold); border-radius: 2px; margin-top: 16px; }
.lead { color: var(--muted); font-size: 1.02rem; margin-top: 14px; max-width: 34em; }
.hero .btn { margin-top: 22px; }
.hero--sub { padding: 30px 0 6px; }
.hero--sub h1 { font-size: 1.75rem; }

/* 클립 밴드 (홈의 핵심 섹션) */
.clips-band { background: var(--night); color: #f2ece1; padding: 40px 0 44px; }
.clips-band .section-head h2 { color: #fff; font-size: 1.5rem; }
.clips-band .section-head p { color: #c9c0b0; }
.clip-row {
  list-style: none; margin: 0 -20px; padding: 0 20px 6px;
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 62%); gap: 14px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
}
.clip-row::-webkit-scrollbar { display: none; }
.clip-card { scroll-snap-align: start; }
.clip-link { display: block; color: inherit; text-decoration: none; }
.clip-thumb {
  position: relative; display: block; aspect-ratio: 9 / 16; overflow: hidden;
  border-radius: var(--r); background: var(--night-2);
}
.clip-thumb img { width: 100%; height: 100%; object-fit: cover; }
.clip-thumb::after { content: ""; position: absolute; inset: 55% 0 0; background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.45)); pointer-events: none; }
.clip-play {
  position: absolute; left: 14px; bottom: 14px; z-index: 1;
  width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, 0.92);
}
.clip-play::before { content: ""; position: absolute; left: 17px; top: 13px; border-style: solid; border-width: 9px 0 9px 14px; border-color: transparent transparent transparent var(--night); }
.clip-dur { position: absolute; right: 12px; top: 12px; z-index: 1; font-size: 0.78rem; font-weight: 700; color: #fff; background: rgba(0, 0, 0, 0.5); padding: 2px 8px; border-radius: 999px; }
.clip-tag { position: absolute; left: 10px; top: 10px; z-index: 1; font-size: 0.72rem; background: rgba(154, 52, 18, 0.92); color: #fff; padding: 2px 8px; border-radius: 6px; }
.clip-noimg { position: absolute; inset: 0; display: grid; place-items: center; color: #b6ab98; font-size: 0.85rem; }
.clip-meta { display: block; padding: 12px 2px 0; }
.clip-kind { display: block; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; color: var(--gold); }
.clip-title { display: block; font-size: 1rem; line-height: 1.45; margin-top: 4px; }
.clip-btn {
  display: inline-flex; align-items: center; min-height: 44px; margin-top: 10px; padding: 0 16px;
  border-radius: 999px; border: 1.5px solid var(--gold); color: #f3e6cc; font-size: 0.9rem; font-weight: 700;
}
.clip-btn::after { content: " →"; white-space: pre; }
.clip-link:hover .clip-btn, .clip-link:focus-visible .clip-btn { background: var(--gold); color: var(--night); }
.clip-empty { border: 1px dashed #3b4a43; border-radius: var(--r); padding: 26px 18px; text-align: center; }
.clip-empty .small { color: #b6ab98; margin-top: 4px; }

.clip-row--light .clip-btn { color: var(--ink); }
.clip-row--light .clip-kind { color: var(--gold-deep); }

/* 카테고리 */
.cats { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cat { display: block; height: 100%; min-height: 96px; padding: 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.cat strong { display: block; font-size: 1.06rem; }
.cat span { display: block; font-size: 0.83rem; color: var(--muted); line-height: 1.5; margin-top: 4px; }

/* 글 카드 · 빈 상태 */
.cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.card a { display: block; padding: 18px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.card-cat { font-size: 0.78rem; color: var(--gold-deep); font-weight: 700; }
.card-title { display: block; font-size: 1.08rem; line-height: 1.5; margin: 4px 0; }
.card-sum { display: block; font-size: 0.92rem; color: var(--muted); line-height: 1.6; }
.empty { padding: 30px 20px; text-align: center; border: 1px dashed #d9cfbf; border-radius: var(--r); background: var(--surface); }
.empty-title { font-weight: 700; font-size: 1.05rem; margin-bottom: 4px; }
.empty p:not(.empty-title) { color: var(--muted); font-size: 0.93rem; }

/* 글 */
.template-note { margin-top: 20px; background: var(--gold-soft); border-radius: var(--r-sm); padding: 12px 16px; font-size: 0.9rem; line-height: 1.6; }
.post-head { padding: 26px 0 6px; }
.post-head h1 { font-size: clamp(1.45rem, 6vw, 1.95rem); margin: 6px 0 12px; }
.post-cat { font-size: 0.85rem; font-weight: 700; }
.post-cat a { color: var(--gold-deep); text-decoration: none; }
.meta, .credit { font-size: 0.86rem; color: var(--muted); }
.credit { margin-top: 4px; }
.post-body { margin-top: 18px; }
.post-body p { margin: 0 0 1.15em; }
.post-body h2 { font-size: 1.24rem; margin: 2.2em 0 0.7em; }
.post-body h3 { font-size: 1.06rem; margin: 1.6em 0 0.5em; }
.post-body ul { padding-left: 20px; margin: 0 0 1.15em; }
.photo { margin: 26px -20px; }
.photo figcaption { padding: 8px 20px 0; font-size: 0.86rem; color: var(--muted); line-height: 1.6; }
.photo--pending .ph {
  aspect-ratio: 4 / 3; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: repeating-linear-gradient(45deg, #f3eee6, #f3eee6 10px, #ece5da 10px, #ece5da 20px);
  color: var(--muted); font-weight: 700; text-align: center; padding: 12px;
}

.clip-box { display: grid; grid-template-columns: 112px 1fr; gap: 16px; align-items: center; margin: 26px 0; padding: 14px; border-radius: var(--r); background: var(--night); color: #f2ece1; }
.clip-box-thumb { display: block; }
.clip-box .clip-thumb { border-radius: var(--r-sm); }
.clip-box .clip-play { width: 34px; height: 34px; left: 8px; bottom: 8px; }
.clip-box .clip-play::before { left: 13px; top: 10px; border-width: 7px 0 7px 11px; }
.clip-box .clip-dur, .clip-box .clip-tag { display: none; }
.clip-box-title { font-weight: 700; line-height: 1.45; margin-top: 2px; }
.clip-box .small { color: #b6ab98; margin-top: 8px; }
.clip-box--pending { display: block; background: var(--warn-soft); color: var(--ink); border: 1px dashed #e7b48f; }
.clip-box--pending .small { color: var(--muted); }

.info { background: var(--green-soft); border-radius: var(--r-sm); padding: 14px 16px; margin: 22px 0; font-size: 0.94rem; line-height: 1.7; }
.info p { margin: 0 0 0.4em; }
.info-label { font-weight: 700; color: var(--green); font-size: 0.82rem; }
.info-src { font-size: 0.84rem; }
.sources { border-top: 1px solid var(--line); margin-top: 32px; padding-top: 8px; font-size: 0.9rem; }
.sources h2 { font-size: 1rem; margin: 12px 0 6px; }
.tags { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 8px; font-size: 0.86rem; color: var(--muted); }
.clip-cta { margin-top: 36px; padding: 22px 18px; border-radius: var(--r); background: var(--night); color: #f2ece1; text-align: center; }
.clip-cta-title { font-weight: 800; font-size: 1.1rem; color: #fff; }
.clip-cta .small { color: #c9c0b0; margin-top: 4px; }
.clip-cta .btn--gold { margin-top: 16px; }
.author-box { margin: 18px 0 8px; padding: 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); font-size: 0.9rem; line-height: 1.7; }
.author-box p + p { margin-top: 4px; }
.pending { color: var(--warn); font-weight: 700; }

/* 편집자용 (검토본에만) */
.section--editor { padding-bottom: 24px; }
.editor { margin: 28px 0 8px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); padding: 0 16px; font-size: 0.88rem; line-height: 1.6; }
.editor summary { cursor: pointer; padding: 14px 0; font-weight: 700; color: var(--muted); min-height: 44px; }
.editor[open] { padding-bottom: 14px; }
.editor-h { font-weight: 700; margin-top: 10px; }
.editor-links { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 0; list-style: none; margin: 0 0 6px; }
.editor-links a { display: inline-flex; min-height: 40px; align-items: center; font-weight: 700; }
.issues { margin: 4px 0 6px; padding-left: 18px; color: var(--warn); }
.ok { color: var(--green); }
.editor-page h1 { font-size: 1.5rem; margin: 26px 0 6px; }
.editor-page h2 { font-size: 1.1rem; margin: 26px 0 8px; }
.editor-list { padding-left: 18px; font-size: 0.9rem; }
.editor-list > li { margin-bottom: 14px; }
.editor-list pre { white-space: pre-wrap; word-break: break-all; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px; font-size: 0.82rem; }
.badge { display: inline-block; font-size: 0.75rem; padding: 2px 10px; border-radius: 999px; margin-right: 6px; background: var(--line); }
.badge--approved { background: var(--green-soft); color: var(--green); }
.badge--review { background: #eef2ff; color: #3730a3; }
.badge--warn { background: var(--warn-soft); color: var(--warn); }

/* 푸터 */
.site-footer { border-top: 1px solid var(--line); margin-top: 48px; padding: 28px 0 44px; font-size: 0.86rem; color: var(--muted); }
.site-footer p + p { margin-top: 8px; }
.footer-brand { font-weight: 800; color: var(--ink); }
.site-footer a { display: inline-flex; min-height: 40px; align-items: center; }

@media (min-width: 760px) {
  body { font-size: 18px; }
  .hero { padding: 64px 0 48px; }
  .clips-band { padding: 56px 0 60px; }
  .clip-row { margin: 0; padding: 0 0 6px; grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); grid-auto-columns: auto; overflow: visible; }
  .clips-band .btn--gold { max-width: 420px; }
  .cats { grid-template-columns: repeat(4, 1fr); }
  .cards { grid-template-columns: 1fr 1fr; }
  .photo { margin-left: 0; margin-right: 0; }
  .photo img { border-radius: var(--r); }
  .photo figcaption { padding-left: 0; padding-right: 0; }
  .clip-box { grid-template-columns: 136px 1fr; padding: 18px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
