/* ===========================================================
   용어집(glossary/index.html) 전용 — base.css → hub.css 다음에 로드.
   데이터는 glossary/data.js(자동 생성, tools/glossary.js). 출처 이름 색만 --c-*(다른 도메인을 가리킴).
   =========================================================== */
.gloss-hero { padding: 56px 0 44px; }      /* 허브보다 낮게 — 목록이 빨리 보이게 */
.gloss-main { max-width: 1000px; padding-top: 32px; }
.gloss-main .chips { margin-bottom: 10px; }

/* 글자 고르기 — 한 번에 한 글자만 보여 준다. 상단 바 아래에 붙어 있고, 좁은 화면에서는 가로로 밀어 본다 */
.az {
  position: sticky; top: calc(var(--header-h) + 1px); z-index: 20;
  display: flex; gap: 2px; margin: 0; padding: 8px 0; overflow-x: auto;
  background: var(--bg); border-bottom: 1px solid var(--line); scrollbar-width: none;
}
.az::-webkit-scrollbar { display: none; }
.az a, .az span {
  flex: none; min-width: 32px; padding: 3px 7px; border-radius: 8px; text-align: center;
  font-size: 14.5px; font-weight: 700; text-decoration: none;
}
.az a { color: var(--muted); }
.az a:hover { background: var(--theme-soft); color: var(--theme); }
.az a.on { background: var(--theme); color: #fff; }
.az span.off { color: var(--line); }

.letter h2 { display: flex; align-items: baseline; gap: 12px; margin: 22px 0 0; padding-bottom: 6px; border-bottom: 1px solid var(--line); color: var(--theme); font-size: 26px; font-weight: 800; }
.letter h2 small { color: var(--muted); font-size: 14px; font-weight: 600; }
.gloss-main .result-meta { margin: 18px 0 0; }

/* 다른 글자로 시작하는 별칭 → 본 항목 바로가기 */
.see { margin: 0; padding: 9px 0; border-bottom: 1px solid var(--line-2); color: var(--muted); font-size: 15px; }
.see b { color: var(--text); font-weight: 600; }
.see a { color: var(--theme); text-decoration: none; }
.see a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* 앞뒤 글자 */
.pager { display: flex; justify-content: space-between; margin-top: 28px; }
.pager a { padding: 8px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--theme); font-weight: 700; text-decoration: none; }
.pager a:hover { border-color: var(--theme); }

/* 용어 한 항목 — 상단 바 + 글자 줄 아래로 맞춰 멈춤 */
.term { padding: 18px 0 20px; border-bottom: 1px solid var(--line-2); scroll-margin-top: calc(var(--header-h) + 64px); }
.term.flash { animation: term-flash 2.2s ease-out; }
@keyframes term-flash { from { background: var(--theme-soft); } to { background: transparent; } }
.term h3 { margin: 0; font-size: 19px; font-weight: 700; line-height: 1.35; }
.term h3 a { color: inherit; text-decoration: none; }
.term h3 a:hover { color: var(--theme); }
.term .aka { margin: 2px 0 0; color: var(--faint); font-size: 13.5px; }

/* 앞 = 나오는 곳, 뒤 = 정의 */
.rows { margin-top: 8px; }
.row { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 0 18px; padding: 4px 0; }
.row .from { padding-top: 1px; font-size: 13.5px; font-weight: 600; line-height: 1.55; }
.row .from a { color: var(--accent, var(--theme)); text-decoration: none; }
.row .from a:hover { text-decoration: underline; text-underline-offset: 3px; }
.row .def { color: var(--body); font-size: 15px; line-height: 1.6; }
.row .def a { color: var(--theme); text-decoration: none; }
.row .def a:hover { text-decoration: underline; text-underline-offset: 3px; }
.row .go { margin-left: 4px; font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.row .kind { margin-right: 6px; color: var(--muted); font-size: 13px; font-weight: 600; }
.row.more .from { color: var(--muted); }
.row.more .def { color: var(--muted); font-size: 14px; }
.row .n { color: var(--faint); }

.gloss-empty a { color: var(--theme); }

@media (max-width: 1080px) {
  .lab-link { margin-left: auto; }   /* 도메인 내비가 숨으면 오른쪽 끝으로 */
}
@media (max-width: 760px) {
  .gloss-hero { padding: 36px 0 30px; }
  .gloss-hero .lead { font-size: 16px; }
}
@media (max-width: 600px) {
  .az a, .az span { min-width: 30px; padding: 3px 6px; }  .term h3 { font-size: 18px; }
  .row { grid-template-columns: 1fr; padding: 5px 0; }
  .row .from { font-size: 13px; }
  .row .def { font-size: 14.5px; }
}
