/* 분류 선반형 — Noto Sans KR 한 벌, 밝은 회백 바탕 + 짙은 올리브 + 사프란 노랑 */
:root {
  --bg: #F3F2EC; --card: #FFFFFF; --ink: #1F241A; --ink2: #464C3E; --mut: #7D8274; --line: #DEDCD2;
  --olive: #2E3A23; --olive2: #43532F; --sun: #E3A72F; --sun-soft: #F7E7BF;
  --f: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Malgun Gothic', sans-serif;
  --w: 1200px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.7 var(--f); word-break: keep-all; overflow-wrap: anywhere; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, p, ul, ol, figure { margin: 0; }
img { display: block; max-width: 100%; }
.ic { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
a:focus-visible, button:focus-visible, .in:focus-visible { outline: 2px solid var(--sun); outline-offset: 2px; }
.wrap { max-width: var(--w); margin: 0 auto; padding: 0 32px; }
.none { padding: 40px 0; color: var(--mut); }

/* 머리글 */
.hd { background: var(--olive); color: #F3F2EC; }
.hd__in { max-width: var(--w); margin: 0 auto; padding: 0 32px; height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.hd__brand { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 17px; letter-spacing: -0.03em; white-space: nowrap; }
.hd__brand .brand__mark { width: 26px; height: 26px; color: var(--sun); }
.hd__brand em { font-style: normal; font-weight: 500; font-size: 13px; color: rgba(243,242,236,.6); }
.hd__nav { display: flex; gap: 4px; }
.hd__a { padding: 6px 12px; border-radius: 6px; font-size: 14px; font-weight: 500; color: rgba(243,242,236,.75); white-space: nowrap; }
.hd__a:hover { color: #fff; background: rgba(255,255,255,.08); }
.hd__a.is-on { color: var(--olive); background: var(--sun); font-weight: 700; }

/* 맨 위: 새 글 1 + 소개·검색 */
.lead { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 40px; padding-top: 40px; padding-bottom: 20px; align-items: stretch; }
.lead__a { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); background: var(--card); border-radius: 12px; overflow: hidden; }
.lead__pic { display: block; min-height: 280px; }
.lead__pic img { width: 100%; height: 100%; object-fit: cover; }
.lead__txt { display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 28px 30px; }
.lead__k { font-size: 12.5px; font-weight: 700; color: var(--olive2); }
.lead__t { font-size: 24px; font-weight: 900; line-height: 1.35; letter-spacing: -0.04em; }
.lead__a:hover .lead__t { text-decoration: underline; text-underline-offset: 4px; }
.lead__ex { font-size: 14.5px; color: var(--ink2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.lead__side { display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.lead__h { font-size: 40px; font-weight: 900; line-height: 1.15; letter-spacing: -0.05em; }
.lead__s { color: var(--ink2); }
.find { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--mut); }
.find__in { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 15px; color: var(--ink); padding: 6px 0; }
.find__btn { padding: 8px 14px; border: 0; border-radius: 7px; background: var(--olive); color: #fff; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.jump { display: flex; flex-wrap: wrap; gap: 6px; }
.jump a { padding: 4px 10px; border-radius: 6px; background: var(--sun-soft); font-size: 13px; font-weight: 500; color: var(--olive); }
.jump a:hover { background: var(--sun); }

/* 선반 */
.shelves { padding-bottom: 80px; }
.shelf { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 32px; padding: 30px 0 4px; border-top: 1px solid var(--line); margin-top: 26px; }
.shelf__hd { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding-top: 4px; }
.shelf__t { font-size: 24px; font-weight: 900; line-height: 1.25; letter-spacing: -0.04em; }
.shelf__d { font-size: 14px; color: var(--mut); }
.shelf__all { margin-top: 10px; padding: 7px 12px; border-radius: 6px; background: var(--card); font-size: 13.5px; font-weight: 700; color: var(--olive2); white-space: nowrap; }
.shelf__all:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.rack, .grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card__a { display: flex; flex-direction: column; gap: 6px; height: 100%; }
.card__pic { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 10px; background: var(--olive2); margin-bottom: 6px; }
.card__pic img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card__a:hover img { transform: scale(1.04); }
.card__pic--none { display: flex; align-items: flex-end; padding: 16px; }
.card__pic--none b { color: var(--sun); font-size: 15px; font-weight: 900; }
.card__t { font-size: 16.5px; font-weight: 700; line-height: 1.45; letter-spacing: -0.03em; }
.card__a:hover .card__t { text-decoration: underline; text-underline-offset: 3px; }
.card__m { font-size: 12.5px; color: var(--mut); }
.card--more { display: flex; flex-direction: column; gap: 12px; padding: 22px; border: 1.5px dashed var(--line); border-radius: 10px; align-self: start; }
.more__k { font-size: 13px; font-weight: 700; color: var(--mut); }
.more__go { align-self: flex-start; font-size: 14px; font-weight: 700; color: var(--olive2); }
.more__go:hover { text-decoration: underline; text-underline-offset: 3px; }

/* 글자 선반 */
.shelf.shelf--text { grid-template-columns: 1fr 1fr; gap: 40px; }
.tshelf .shelf__t { display: block; margin-bottom: 14px; }
.pop { list-style: none; padding: 0; counter-reset: pop; }
.pop li { counter-increment: pop; border-bottom: 1px solid var(--line); }
.pop a { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: baseline; padding: 11px 0; }
.pop a::before { content: counter(pop); font-weight: 900; color: var(--sun); font-size: 17px; }
.pop__t { font-weight: 500; }
.pop a:hover .pop__t { text-decoration: underline; text-underline-offset: 3px; }
.pop__v { font-size: 12.5px; color: var(--mut); white-space: nowrap; }
.tcloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tcloud a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); font-size: 13.5px; }
.tcloud a i { font-style: normal; font-size: 11.5px; color: var(--mut); }
.tcloud a:hover { border-color: var(--olive2); }
.tcloud a.is-on { background: var(--olive); color: #fff; border-color: var(--olive); }
.tcloud--sm a { padding: 4px 10px; font-size: 13px; }

/* 선반 펼침 */
.open { padding-top: 30px; padding-bottom: 80px; }
.back { display: inline-block; font-size: 14px; font-weight: 600; color: var(--olive2); }
.back:hover { text-decoration: underline; text-underline-offset: 3px; }
.open__hd { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin: 14px 0 20px; }
.open__t { font-size: 38px; font-weight: 900; letter-spacing: -0.05em; line-height: 1.2; }
.open__s { margin-top: 6px; color: var(--mut); }
.open__hd .find { width: 340px; flex: none; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 0; border-top: 1px solid var(--line); }
.tabs a { padding: 6px 13px; border-radius: 6px; font-size: 14px; font-weight: 500; color: var(--ink2); background: var(--card); }
.tabs a.is-on { background: var(--sun); color: var(--olive); font-weight: 700; }
.open .tcloud { margin-bottom: 26px; }
.grid { row-gap: 32px; }

/* 글 보기 */
.slim { max-width: 760px; padding-top: 40px; padding-bottom: 40px; }
.post__t { margin-top: 14px; font-size: 36px; font-weight: 900; line-height: 1.3; letter-spacing: -0.05em; }
.post__m { margin-top: 10px; color: var(--mut); font-size: 14px; }
.post__fig { margin: 28px 0 32px; }
.post__fig img { width: 100%; height: auto; border-radius: 12px; }
.post__m + .prose { margin-top: 28px; }
.prose { font-size: 17px; line-height: 1.9; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: 22px; font-weight: 900; line-height: 1.45; letter-spacing: -0.04em; margin-top: 2em; }
.prose h3 { font-size: 18.5px; font-weight: 700; margin-top: 1.7em; }
.prose h2 + *, .prose h3 + * { margin-top: .6em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .35em; }
.prose li::marker { color: var(--sun); }
.prose strong { font-weight: 700; background: linear-gradient(transparent 60%, var(--sun-soft) 60%); }
.prose a { color: var(--olive2); text-decoration: underline; text-underline-offset: 3px; }
.post__tags { margin-top: 30px; }
.ask { margin-top: 40px; padding: 28px 30px; border-radius: 12px; background: var(--olive); color: #F3F2EC; }
.ask__t { font-size: 20px; font-weight: 900; letter-spacing: -0.03em; }
.ask__s { margin: 6px 0 18px; font-size: 14.5px; color: rgba(243,242,236,.75); }
.post__shelf { padding-bottom: 80px; }

/* 버튼·폼 */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 22px; border: 0; border-radius: 8px; background: var(--sun); color: var(--olive); font-size: 15px; font-weight: 900; white-space: nowrap; cursor: pointer; }
.btn:hover { background: #EDB846; }
.btn--line { background: transparent; border: 1px solid var(--line); color: var(--ink); font-weight: 700; }
.btn--line:hover { background: var(--card); }
.from { display: flex; gap: 10px; margin-top: 20px; padding: 12px 16px; border-radius: 8px; background: var(--sun-soft); font-size: 14.5px; font-weight: 500; }
.from span { color: var(--olive2); font-weight: 700; flex: none; }
.form { display: grid; gap: 16px; margin-top: 28px; padding: 28px; border-radius: 12px; background: var(--card); }
.fr { display: grid; gap: 6px; }
.fr > span { font-size: 13.5px; font-weight: 700; color: var(--ink2); }
.fr2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.in { width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); font-size: 15px; }
.in:focus { outline: none; border-color: var(--olive2); background: #fff; }
textarea.in { resize: vertical; line-height: 1.7; }
.err { color: #A83A2A; font-size: 14px; }
.err:empty { display: none; }
.hint { color: var(--mut); font-size: 13px; }
.btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

/* 바닥글 */
.ft { background: var(--olive); color: rgba(243,242,236,.72); }
.ft__in { max-width: var(--w); margin: 0 auto; padding: 32px 32px 44px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.ft__note { font-size: 13px; max-width: 680px; }
.ft__reset { padding: 8px 14px; border: 1px solid rgba(243,242,236,.3); border-radius: 8px; background: none; color: #F3F2EC; font-size: 13px; cursor: pointer; white-space: nowrap; }
.ft__reset:hover { background: rgba(255,255,255,.08); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 16px); max-width: calc(100% - 32px); padding: 11px 18px; border-radius: 8px; background: var(--olive); color: #fff; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 50; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 980px) {
  .shelf { grid-template-columns: 180px minmax(0, 1fr); gap: 24px; }
  .lead { grid-template-columns: 1fr; }
  .lead__side { order: -1; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .wrap { padding: 0 16px; }
  .hd__in { padding: 0 16px; height: 56px; }
  .hd__brand em { display: none; }
  .hd__a { padding: 5px 8px; font-size: 13px; }
  .lead { padding-top: 24px; gap: 20px; }
  .lead__h { font-size: 32px; }
  .lead__a { grid-template-columns: 1fr; }
  .lead__pic { min-height: 0; aspect-ratio: 3 / 2; }
  .lead__txt { padding: 20px; }
  .lead__t { font-size: 20px; }
  .shelf { grid-template-columns: 1fr; gap: 14px; padding-top: 24px; margin-top: 18px; }
  .shelf__hd { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; }
  .shelf__t { font-size: 20px; }
  .shelf__d { grid-row: 2; }
  .shelf__all { grid-row: 1 / 3; grid-column: 2; margin: 0; }
  /* 선반은 옆으로 넘겨 보는 줄로 */
  .rack { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 16px; margin: 0 -16px; padding: 0 16px 8px; scrollbar-width: none; }
  .rack::-webkit-scrollbar { display: none; }
  .rack > li { flex: 0 0 70vw; max-width: 280px; scroll-snap-align: start; }
  .card--more { grid-column: auto !important; flex: 0 0 60vw !important; }
  .shelf.shelf--text { grid-template-columns: 1fr; gap: 28px; }
  .open { padding-top: 22px; }
  .open__hd { flex-direction: column; align-items: stretch; gap: 14px; }
  .open__hd .find { width: auto; }
  .open__t { font-size: 30px; }
  .grid { grid-template-columns: 1fr 1fr; gap: 24px 12px; }
  .card__t { font-size: 15px; }
  .slim { padding-top: 26px; }
  .post__t { font-size: 27px; }
  .post__fig { margin-left: -16px; margin-right: -16px; }
  .post__fig img { border-radius: 0; }
  .prose { font-size: 16.5px; }
  .ask { padding: 24px 20px; }
  .form { padding: 20px 16px; margin-left: -4px; margin-right: -4px; }
  .fr2 { grid-template-columns: 1fr; }
  .ft__in { flex-direction: column; align-items: flex-start; padding: 28px 16px 40px; }
}
