/* 홈페이지 (TRD 4편 4장). 공개 화면은 부분 글꼴(2,350자)을 먼저 쓴다 */
body.public { font-family: "PretendardSub", var(--font); }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--s6); }
@media (max-width: 639px) { .wrap { padding: 0 var(--s4); } }
.site-top { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.site-top .logo { font-weight: 500; text-decoration: none; font-size: 18px; }
.site-top nav { display: flex; gap: var(--s5); font-size: var(--fs-small); }
.site-top nav a { text-decoration: none; }
.site-top nav a:hover { text-decoration: underline; }

.hero { min-height: 46vh; display: flex; flex-direction: column; justify-content: center; padding: var(--s8) 0 var(--s7); }
.hero.compact { min-height: 0; padding: var(--s5) 0; }
.search { display: flex; align-items: center; border: 1px solid var(--ink); height: 72px; padding: 0 var(--s5); max-width: 820px; width: 100%; margin: 0 auto; }
.hero.compact .search { height: 52px; max-width: none; }
.search svg { flex: none; width: 24px; height: 24px; margin-right: var(--s3); }
.search input { border: 0; min-height: 0; height: 100%; padding: 0; font-size: var(--fs-hero); font-weight: 400; background: transparent; }
.hero.compact .search input { font-size: 20px; }
.search input:focus { outline: none; }
.search:focus-within { outline: 2px solid var(--ink); outline-offset: 2px; }
@media (max-width: 639px) { .search input { font-size: 22px; } .search { height: 56px; } }
.hint { text-align: center; color: var(--muted); font-size: var(--fs-small); margin-top: var(--s3); }

.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s5); margin: var(--s4) 0 var(--s8); }
@media (max-width: 1279px) { .cards { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 1023px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 639px) { .cards { grid-template-columns: 1fr; } }
.card { display: block; text-decoration: none; color: var(--text); }
.card .thumb { aspect-ratio: 4 / 3; background: var(--fill); display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: var(--fs-small); border-bottom: 1px solid var(--line); }
.card:hover .thumb { border-bottom-color: var(--ink); }
.card .name { font-weight: 500; margin-top: var(--s3); }
.card .meta { font-size: var(--fs-small); color: var(--muted); }
.card .sum { font-size: var(--fs-small); margin-top: var(--s1); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.section-title { font-size: var(--fs-small); font-weight: 500; color: var(--muted); margin: var(--s5) 0 0; }

.item { display: grid; grid-template-columns: 7fr 5fr; gap: var(--s6); margin: var(--s5) 0 var(--s6); }
@media (max-width: 1023px) { .item { grid-template-columns: 1fr; } }
.item dl { display: grid; grid-template-columns: max-content 1fr; gap: var(--s2) var(--s5); font-size: var(--fs-small); }
.item dt { color: var(--muted); }
.item dd { margin: 0; }
.prose { max-width: 760px; white-space: pre-line; }
.versions details { border-top: 1px solid var(--line); padding: var(--s3) 0; }
.versions summary { cursor: pointer; display: flex; gap: var(--s4); flex-wrap: wrap; align-items: center; font-size: var(--fs-small); }
.versions summary b { min-width: 5em; }
.adminbar { background: var(--ink); color: var(--paper); font-size: var(--fs-small); }
.adminbar .wrap { display: flex; gap: var(--s4); align-items: center; min-height: 44px; flex-wrap: wrap; }
.adminbar a { color: var(--paper); }
.site-foot { border-top: 1px solid var(--line); padding: var(--s5) 0; color: var(--muted); font-size: var(--fs-small); margin-top: var(--s8); }
.log-row { border-top: 1px solid var(--line); padding: var(--s3) 0; display: grid; grid-template-columns: 9em 1fr; gap: var(--s4); font-size: var(--fs-small); }
@media (max-width: 639px) { .log-row { grid-template-columns: 1fr; } }

.chips { display: flex; gap: var(--s2); flex-wrap: wrap; justify-content: center; margin-top: var(--s4); }
.hero.compact .chips { justify-content: flex-start; }
.chip { display: inline-flex; align-items: center; height: 32px; padding: 0 var(--s3); border: 1px solid var(--line); text-decoration: none; font-size: var(--fs-small); }
.chip:hover { border-color: var(--ink); }
.chip.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.filters { margin-top: var(--s3); text-align: center; }
.hero.compact .filters { text-align: left; }
.filters summary { cursor: pointer; display: inline-block; }
.filter-form { display: flex; flex-wrap: wrap; gap: var(--s5); align-items: flex-end; text-align: left; border: 1px solid var(--line); padding: var(--s4); margin-top: var(--s3); }
.filter-form fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); }
.filter-form legend { font-size: var(--fs-small); font-weight: 500; margin-bottom: var(--s1); width: 100%; }
.filter-form .check { margin: 0; }
.card .thumb picture, .card .thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card:focus-visible { outline-offset: 4px; }
.gallery .shot { display: block; background: var(--fill); }
.gallery .shot img { display: block; width: 100%; height: auto; }
.gallery .empty-shot { aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.strip { display: flex; gap: var(--s2); overflow-x: auto; margin-top: var(--s2); }
.strip a { flex: none; border: 1px solid var(--line); }
.strip a:hover { border-color: var(--ink); }
.strip img { display: block; width: 120px; height: auto; max-height: 120px; object-fit: cover; object-position: top; }
.prose-list { max-width: 760px; padding-left: 1.2em; }
.prose-list li { margin-bottom: var(--s1); }
