/* Jin 앱 공용 컴포넌트 */
.kicker { font-size: 12px; font-weight: 700; letter-spacing: .11em; color: var(--clay); text-transform: uppercase; margin-bottom: 8px; }
.page-title { font-family: "Noto Serif KR", serif; font-weight: 700; font-size: 27px; color: #fff; letter-spacing: -0.01em; line-height: 1.35; }
.page-sub { font-size: 14px; color: var(--sub); margin-top: 6px; }
.page-head { margin-bottom: 30px; }
h2.sec { font-family: "Noto Serif KR", serif; font-size: 19px; font-weight: 700; color: #fff; margin: 34px 0 14px; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 24px 26px; box-shadow: 0 1px 2px rgba(0,0,0,.3);
}
.card .card-label { font-size: 12.5px; color: var(--sub); margin-bottom: 6px; }
.card .card-label b { color: var(--text); }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid2 { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
@media (max-width: 860px) { .grid2 { grid-template-columns: 1fr; } }
/* 그리드 자식은 min-width:0 — 없으면 표·긴 텍스트가 컬럼을 늘려 페이지가 가로로 넘침(모바일 깨짐) */
.grid > *, .grid2 > * { min-width: 0; }
/* 2칼럼 스택 — 카드 높이 불균형 없이 와이드 화면을 채우는 기본 패턴 */
.cols { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.col { display: grid; gap: 14px; align-content: start; }
@media (max-width: 1000px) { .cols { grid-template-columns: 1fr; } }

.stat-num { font-family: "Noto Serif KR", serif; font-weight: 700; font-size: 34px; color: #fff; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat-num small { font-family: "Pretendard Variable", sans-serif; font-weight: 600; font-size: 12.5px; color: var(--clay); margin-left: 6px; }
.stat-cap { font-size: 12.5px; color: var(--sub); margin-top: 4px; }

.banner {
  background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--clay);
  border-radius: 12px; padding: 16px 20px; font-size: 14px; color: var(--sub); margin-bottom: 22px;
}
.banner b { color: var(--text); }

.chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 5px 13px;
  border-radius: 999px; border: 1px solid var(--line); color: var(--sub);
  background: none; font-family: inherit; cursor: default; user-select: none;
}
.chip.tog { cursor: pointer; transition: all .13s; }
.chip.tog:hover { color: var(--text); border-color: #4A453D; }
.chip.on { border-color: var(--clay); color: var(--clay); background: var(--clay-dim); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
/* 터치 기기: 공통 컨트롤 탭 영역 ≥44px (Apple HIG·WCAG 권장, 기본 27~36px는 미달) */
@media (pointer: coarse) {
  .chip { min-height: 44px; }
  .btn, .btn-ghost, .btn-danger-ghost { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
  /* 인라인 액션 링크: 레이아웃 이동 없이 세로 히트영역 확장(음수 마진으로 상쇄) */
  a.plain { display: inline-block; padding: 11px 6px; margin: -11px -6px; }
}

.btn {
  /* 잉크색 글자 on clay = 5.6:1 (흰색은 3.1:1로 AA 미달) — 브랜드 clay 면은 유지 */
  display: inline-block; background: var(--clay); color: #2A1206; text-decoration: none; border: 0;
  font-size: 14.5px; font-weight: 700; padding: 11px 24px; border-radius: 10px; cursor: pointer;
  font-family: inherit; transition: transform .14s var(--ease), box-shadow .14s;
  box-shadow: 0 4px 16px rgba(217,119,87,.3);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 7px 22px rgba(217,119,87,.42); }
.btn-ghost {
  display: inline-block; background: none; color: var(--text); text-decoration: none;
  font-size: 14px; font-weight: 600; padding: 10px 22px; border-radius: 10px; cursor: pointer;
  font-family: inherit; border: 1.5px solid #4A453D; transition: all .14s;
}
.btn-ghost:hover { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn-danger-ghost {
  display: inline-block; background: none; color: var(--dn); border: 1.5px solid #5A3530;
  font-size: 13.5px; font-weight: 600; padding: 9px 20px; border-radius: 10px; cursor: pointer;
  font-family: inherit; transition: all .14s;
}
.btn-danger-ghost:hover { background: rgba(232,131,107,.1); }

table.tbl { border-collapse: collapse; width: 100%; font-size: 14px; }
table.tbl th { text-align: left; font-size: 12px; font-weight: 600; color: var(--sub); padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line); }
table.tbl td:last-child, table.tbl th:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.pos { color: var(--up); font-weight: 700; }
.neg { color: var(--dn); font-weight: 700; }

.timeline { position: relative; padding-left: 18px; }
.timeline::before { content: ""; position: absolute; left: 4px; top: 6px; bottom: 6px; width: 2px; background: var(--line); border-radius: 2px; }
.tl-item { position: relative; padding: 9px 0 9px 14px; }
.tl-item::before {
  content: ""; position: absolute; left: -17px; top: 15px; width: 8px; height: 8px;
  border-radius: 50%; background: #4A453D; border: 2px solid var(--bg);
}
.tl-item.clay::before { background: var(--clay); box-shadow: 0 0 8px rgba(217,119,87,.7); }
.tl-date { font-size: 11.5px; color: var(--sub); font-variant-numeric: tabular-nums; }
.tl-date b { color: var(--clay); font-weight: 700; margin-left: 6px; }
.tl-text { font-size: 13.5px; color: var(--text); line-height: 1.6; margin-top: 2px; }
.tl-text.dim { color: var(--dim); }

.gauge { height: 9px; background: #2A2722; border-radius: 999px; overflow: hidden; margin: 12px 0 6px; }
.gauge .fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #8C4530, var(--clay));
  box-shadow: 0 0 14px rgba(217,119,87,.5);
}
.gauge-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--sub); }

.tg-bubble {
  background: #1E2A38; border-radius: 4px 16px 16px 16px; padding: 18px 20px;
  font-size: 13.5px; line-height: 1.75; color: #DCE3EA; white-space: pre-wrap; word-break: break-word;
}
.tg-bubble b { color: #fff; }
.tg-bubble code { font-family: inherit; color: #AFC6DD; }

.badge { font-size: 10.5px; font-weight: 700; color: var(--clay); background: var(--clay-dim); border-radius: 999px; padding: 2px 9px; }
.badge.gray { color: var(--sub); background: rgba(255,255,255,.05); }
.sample-note { font-size: 11.5px; color: var(--dim); }

blockquote.q { border-left: 3px solid var(--clay); padding: 2px 0 2px 16px; margin: 14px 0; color: #EDB99A; font-size: 14px; }
.empty-note { font-size: 13px; color: var(--dim); }
.hr { border: 0; border-top: 1px solid var(--line); margin: 26px 0; }
a.plain { color: var(--clay); text-decoration: none; font-weight: 600; font-size: 13.5px; }
a.plain:hover { text-decoration: underline; }

.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(8px);
  background: var(--paper); color: var(--paper-ink); font-size: 13.5px; font-weight: 600;
  padding: 10px 22px; border-radius: 999px; opacity: 0; pointer-events: none;
  transition: all .25s var(--ease); z-index: 100; box-shadow: 0 8px 30px rgba(0,0,0,.5);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* D-1 · reduced-motion: 위치이동/스케일 transform은 끄고 색·테두리 피드백만 유지 */
@media (prefers-reduced-motion: reduce) {
  .btn { transition: box-shadow .14s, background .14s; }
  .btn:hover { transform: none; }
  .btn-ghost, .btn-danger-ghost, .chip.tog { transition: color .12s, background .12s, border-color .12s; }
  .toast { transform: translateX(-50%); transition: opacity .2s; }
  .toast.show { transform: translateX(-50%); }
}

/* ── 용어 해설 — 점선밑줄 용어 + 탭 팝오버 (glossary.js + shell.js Jin.termify) ── */
.jin-term { color: var(--clay); border-bottom: 1px dotted var(--clay); cursor: pointer; }
.jin-term:focus-visible { outline: 2px solid var(--clay); outline-offset: 2px; border-radius: 2px; }
.jin-pop {
  position: absolute; z-index: 1000; max-width: 320px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 15px; box-shadow: 0 8px 26px rgba(0, 0, 0, .5);
  font-size: 13px; line-height: 1.6;
}
.jin-pop[hidden] { display: none; }
.jin-pop .jp-t { font-size: 14px; font-weight: 700; color: #fff; }
.jin-pop .jp-en { font-size: 11.5px; color: var(--dim); font-weight: 500; margin-left: 7px; }
.jin-pop .jp-d { color: var(--sub); margin-top: 6px; }
.jin-pop .jp-m { color: var(--dim); font-size: 12px; margin-top: 5px; }
.jin-pop .jp-lk { display: inline-block; color: var(--clay); font-size: 12.5px; margin-top: 9px; text-decoration: none; }
.jin-pop .jp-lk:hover { text-decoration: underline; }
.jin-pop .jp-pol { color: var(--dim); font-size: 10.5px; margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--line); }
@media (pointer: coarse) { .jin-term { padding: 2px 0; } }
