/* 칼럼 넓은 표 + 넓은 화면 배치 (2026-11-19, 전체 칼럼 적용 — ?tbl=off 로 끔)
   - 넓은 PC: 본문 묶음을 왼쪽 메뉴 옆에 붙임(가운데 정렬로 생기던 270px 빈칸 제거)
   - 넘치는 표만: 표 위 도구줄(안내·←→·크게 보기), 남은 쪽 그림자, 첫 열 고정, 칸 종류별 폭,
     PC에선 화면 아래 따라다니는 가로 스크롤바
   색은 --ds-* / --library-* 이름표만 쓴다. */

@media (min-width: 1280px) {
  .guide-article-v2.tbl-v2 .wiki-article-layout { margin-left: 0; margin-right: auto; padding-left: 56px; }
}

.guide-article-v2.tbl-v2 .tv-frame { position: relative; margin: 24px 0; }
.guide-article-v2.tbl-v2 .tv-frame > .wiki-table-wrapper { margin: 0; }
/* 11/19 떨림 수정: '넘침' 판정이 바뀌어도 표·상자 폭이 절대 바뀌지 않게 — 폭에 영향 주는 규칙은 모두 무조건 적용,
   넘침 여부는 도구줄·그림자·고정 열(폭 무관)만 켠다. 테두리도 폭을 안 먹는 box-shadow로. */
.guide-article-v2.tbl-v2 .tv-frame > .wiki-table-wrapper { border-radius: 10px; box-shadow: inset 0 0 0 1px var(--library-line); }
.guide-article-v2.tbl-v2 .tv-frame > .wiki-table-wrapper:focus-visible { outline: 3px solid var(--ds-primary, #315d43); outline-offset: 2px; }
.guide-article-v2.tbl-v2 .tv-frame .wiki-table { border-collapse: separate; border-spacing: 0; }
.guide-article-v2.tbl-v2 .tv-frame .wiki-table :is(th, td) { border-width: 0 1px 1px 0; }
.guide-article-v2.tbl-v2 .tv-frame .wiki-table tr > :first-child { border-left-width: 1px; }
.guide-article-v2.tbl-v2 .tv-frame .wiki-table tr:first-child > * { border-top-width: 1px; }

/* 도구줄 */
.guide-article-v2.tbl-v2 .tv-bar { display: none; align-items: center; gap: 8px; margin-bottom: 8px; font-size: .8125rem; color: var(--library-muted); }
.guide-article-v2.tbl-v2 .tv-frame.is-overflow .tv-bar { display: flex; }
.guide-article-v2.tbl-v2 .tv-hint { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; }
.guide-article-v2.tbl-v2 .tv-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; min-height: 44px; padding: 0 12px; border: 1px solid var(--library-line); border-radius: 10px; background: var(--library-card); color: var(--library-green); font: inherit; font-weight: 650; cursor: pointer; }
.guide-article-v2.tbl-v2 .tv-btn:hover:not(:disabled) { border-color: var(--library-green); }
.guide-article-v2.tbl-v2 .tv-btn:disabled { opacity: .35; cursor: default; }
.guide-article-v2.tbl-v2 .tv-btn:focus-visible { outline: 3px solid var(--ds-primary, #315d43); outline-offset: 2px; }
.guide-article-v2.tbl-v2 .tv-btn--big span { white-space: nowrap; }

/* 남은 쪽 그림자 (표 상자 안쪽 가장자리) */
.guide-article-v2.tbl-v2 .tv-shade { position: absolute; top: 0; bottom: 0; width: 28px; pointer-events: none; opacity: 0; transition: opacity .15s; z-index: 3; }
.guide-article-v2.tbl-v2 .tv-shade--r { right: 1px; border-radius: 0 10px 10px 0; background: linear-gradient(to left, rgb(39 61 50 / .16), transparent); }
.guide-article-v2.tbl-v2 .tv-shade--l { border-radius: 10px 0 0 10px; background: linear-gradient(to right, rgb(39 61 50 / .14), transparent); }
.guide-article-v2.tbl-v2 .tv-frame.can-r .tv-shade--r, .guide-article-v2.tbl-v2 .tv-frame.can-l .tv-shade--l { opacity: 1; }
.guide-article-v2.tbl-v2 .tv-scroll { position: relative; }

/* 칸 종류별 폭 */
.guide-article-v2.tbl-v2 .tv-frame .wiki-table :is(th, td) { word-break: keep-all; overflow-wrap: break-word; }
.guide-article-v2.tbl-v2 .wiki-table .tv-key { min-width: 7em; max-width: 12em; }
.guide-article-v2.tbl-v2 .wiki-table .tv-wide { min-width: 12em; max-width: 24em; }
.guide-article-v2.tbl-v2 .wiki-table td.tv-num { white-space: nowrap; }
.guide-article-v2.tbl-v2 .wiki-table .tv-mid { min-width: 5em; }

/* 첫 열 고정 */
.guide-article-v2.tbl-v2 .tv-frame.is-sticky .wiki-table .tv-key { position: sticky; left: 0; z-index: 2; background: var(--library-card); box-shadow: 1px 0 0 var(--library-line); }
.guide-article-v2.tbl-v2 .tv-frame.is-sticky .wiki-table th.tv-key { background: var(--library-mint); }
.guide-article-v2.tbl-v2 .tv-frame.is-sticky.can-l .wiki-table .tv-key { box-shadow: 1px 0 0 var(--library-line), 6px 0 8px -6px rgb(39 61 50 / .35); }
.guide-article-v2.tbl-v2 .tv-frame.is-sticky .tv-shade--l { left: calc(var(--tv-key-w, 0px) + 1px); border-radius: 0; }

/* 화면 아래 따라다니는 가로 스크롤바 (PC) */
.tv-float { position: fixed; bottom: 0; height: 16px; overflow-x: auto; overflow-y: hidden; z-index: 40; background: color-mix(in srgb, var(--library-card, #fffdf8) 92%, transparent); border-top: 1px solid var(--library-line, #dce3d7); display: none; }
.tv-float.is-on { display: block; }
.tv-float > div { height: 1px; }

/* 크게 보기 */
.tv-dialog { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; border: 0; background: var(--library-paper, #f8f5ee); color: var(--library-ink, #273d32); }
.tv-dialog::backdrop { background: rgb(0 0 0 / .4); }
.tv-dialog .tv-dlg-head { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--library-card, #fffdf8); border-bottom: 1px solid var(--library-line, #dce3d7); }
.tv-dialog .tv-dlg-title { flex: 1; min-width: 0; margin: 0; font-size: 1rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-dialog .tv-dlg-body { height: calc(100dvh - 65px); overflow: auto; padding: 0 16px 24px; }
.tv-dialog .wiki-table { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; background: var(--library-card, #fffdf8); font-size: .9375rem; line-height: 1.7; }
.tv-dialog .wiki-table :is(th, td) { padding: 12px 14px; border: 0 solid var(--library-line, #dce3d7); border-width: 0 1px 1px 0; vertical-align: top; word-break: keep-all; overflow-wrap: break-word; }
.tv-dialog .wiki-table thead th { position: sticky; top: 0; z-index: 3; background: var(--library-mint, #eaf1e4); }
.tv-dialog .wiki-table .tv-key { position: sticky; left: 0; z-index: 2; background: var(--library-card, #fffdf8); min-width: 9em; max-width: 12em; box-shadow: 1px 0 0 var(--library-line, #dce3d7); }
.tv-dialog .wiki-table thead th.tv-key { z-index: 4; background: var(--library-mint, #eaf1e4); }
.tv-dialog .wiki-table .tv-wide { min-width: 16em; max-width: 26em; }
.tv-dialog .wiki-table td.tv-num { white-space: nowrap; }
.tv-dialog .tv-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; min-height: 44px; padding: 0 14px; border: 1px solid var(--library-line, #dce3d7); border-radius: 10px; background: var(--library-card, #fffdf8); color: var(--library-green, #315d43); font: inherit; font-weight: 650; cursor: pointer; }

@media (max-width: 640px) {
  .guide-article-v2.tbl-v2 .wiki-table .tv-key { min-width: 7em; max-width: 7.5em; }
  .guide-article-v2.tbl-v2 .wiki-table .tv-wide { min-width: 13em; max-width: 15em; }
  .guide-article-v2.tbl-v2 .tv-btn--big span { display: none; }
  .tv-dialog .wiki-table .tv-key { min-width: 7em; max-width: 7.5em; }
  .tv-dialog .wiki-table .tv-wide { min-width: 13em; }
  .tv-dialog .tv-dlg-body { padding: 0 8px 24px; }
}
@media (prefers-reduced-motion: reduce) { .guide-article-v2.tbl-v2 .tv-shade { transition: none; } }
