/* =========================================================
   애매해 도구 공용 부품 — 스킨 변수(--card·--bc·--bw·--r·--btn…)만 쓴다 → 7벌 스킨이 저절로 따라온다
   · 카톡 웹뷰 금지 문법 미사용 · 누르는 곳 44px 이상 · 글자 11px 이상
   ========================================================= */
.tk-head { position: relative; margin-top: 4px; border-radius: var(--r); border: var(--bw) solid var(--bc); overflow: hidden; box-shadow: var(--card-sh); background: var(--card); }
.tk-head .art { aspect-ratio: 16/9; }
.tk-head .tx { padding: 14px 16px 16px; }
.tk-head h1 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(1.9rem, 8.5vw, 2.5rem); line-height: 1.12; letter-spacing: -.02em; }
.tk-head p { margin: 6px 0 0; color: var(--text-sub); font-weight: 600; line-height: 1.5; }
[data-skin="d"] .tk-head h1 { color: #FF6A00; text-shadow: 0 0 12px rgba(255,106,0,.7); }

.tk { margin-top: 18px; display: grid; gap: 14px; }
.tk-card { background: var(--card); border: var(--bw) solid var(--bc); border-radius: var(--r); box-shadow: var(--card-sh); padding: 16px; }
[data-skin="a"] .tk-card, [data-skin="e"] .tk-card { border: 1px solid var(--border); }
.tk-card h2 { margin: 0 0 12px; font-family: var(--display); font-weight: 400; font-size: 1.2rem; letter-spacing: -.02em; }
.tk-card h2 small { font-family: var(--body); font-size: .8rem; font-weight: 700; color: var(--text-sub); margin-left: 6px; }
.tk-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.tk-row + .tk-row { margin-top: 10px; }
.tk-label { display: block; font-size: .86rem; font-weight: 800; color: var(--text-sub); margin: 0 0 6px; }
.tk-field { margin-top: 12px; }
.tk-field:first-child { margin-top: 0; }
.tk-input { width: 100%; min-height: 48px; padding: 0 14px; border-radius: var(--r-sm); border: 1.5px solid var(--border); background: var(--bg); color: var(--text); font: inherit; font-size: 1.05rem; font-weight: 700; }
.tk-input:focus { outline: none; border-color: var(--accent-ink); }
.tk-input.num { text-align: right; font-variant-numeric: tabular-nums; }
.tk-unit { position: relative; }
.tk-unit .tk-input { padding-right: 44px; }
.tk-unit span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--text-sub); font-weight: 800; pointer-events: none; }
.tk-hint { margin: 6px 0 0; font-size: .8rem; color: var(--text-sub); line-height: 1.45; }

/* 고르기 단추(하나만) · 여러 개 고르기 */
.tk-seg { display: flex; flex-wrap: wrap; gap: 8px; }
.tk-seg button, .tk-chip { min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--border); background: var(--card); color: var(--text); font: inherit; font-weight: 800; font-size: .92rem; cursor: pointer; }
.tk-seg button[aria-pressed="true"], .tk-chip[aria-pressed="true"] { background: var(--btn); color: var(--btn-ink); border-color: var(--btn); }
[data-skin="c"] .tk-seg button, [data-skin="c"] .tk-chip { border-radius: 0; }
[data-skin="b"] .tk-seg button[aria-pressed="true"] { box-shadow: 2px 2px 0 #141414; border-color: #141414; }

/* 큰 실행 단추 */
.tk-go { display: flex; width: 100%; align-items: center; justify-content: center; gap: 8px; min-height: 56px; border: 0; border-radius: var(--r-sm); background: var(--btn); color: var(--btn-ink); font: inherit; font-weight: 900; font-size: 1.1rem; cursor: pointer; }
[data-skin="b"] .tk-go { border: 3px solid #141414; box-shadow: 4px 4px 0 #141414; }
[data-skin="d"] .tk-go { box-shadow: 0 0 20px rgba(255,106,0,.55); }
.tk-go.sub { background: var(--surface); color: var(--text); min-height: 48px; font-size: .98rem; }
.tk-btn { min-height: 44px; padding: 0 14px; border-radius: var(--r-sm); border: 1.5px solid var(--border); background: var(--card); color: var(--text); font: inherit; font-weight: 800; font-size: .9rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.tk-x { min-width: 44px; min-height: 44px; border: 0; background: transparent; color: var(--text-sub); font-size: 1.2rem; cursor: pointer; border-radius: 50%; }

/* 결과 */
.tk-result { position: relative; overflow: hidden; text-align: center; padding: 22px 16px; }
.tk-result[hidden] { display: none; }
.tk-result .k { font-size: .82rem; font-weight: 800; color: var(--accent-ink); letter-spacing: .02em; }
.tk-big { margin: 6px 0 4px; font-family: var(--display); font-weight: 400; font-size: clamp(2.4rem, 12vw, 3.4rem); line-height: 1.05; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.tk-big small { font-size: .45em; margin-left: 2px; }
.tk-sub { color: var(--text-sub); font-weight: 700; line-height: 1.5; }
.tk-list { list-style: none; margin: 14px 0 0; padding: 0; text-align: left; display: grid; gap: 8px; }
.tk-list li { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface); font-weight: 700; }
.tk-list li b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tk-list li span { min-width: 0; }
.tk-sectitle { margin: 20px 0 8px; text-align: left; font-size: .92rem; font-weight: 800; color: var(--text); }
.tk-cmplist li.on { background: var(--btn); color: var(--btn-ink); }
.tk-cmplist li.on b { color: var(--btn-ink); }
.tk-elv-row[hidden] { display: none; }
/* 금액 옆에 긴 보조설명(사다리차 층수 구간 등)이 붙을 때 — b를 밀어내지 않게 줄을 나눈다
   ★:has() 금지(카톡 웹뷰에서 규칙 전체 무시) — JS가 .tk-list-wrap 클래스를 직접 붙인다 */
.tk-list li.tk-list-wrap { display: block; }
.tk-list-row { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.tk-list li small { display: block; margin-top: 4px; font-size: .78rem; font-weight: 600; color: var(--text-sub); white-space: normal; }
.tk-pop { animation: tkpop .6s cubic-bezier(.34,1.56,.64,1); }
@keyframes tkpop { 0% { transform: scale(.85); opacity: 0; } 100% { transform: none; opacity: 1; } }
.tk-actions { display: flex; gap: 8px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }

/* 사람 목록(더치페이 등) */
.tk-people { display: grid; gap: 8px; }
.tk-person { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: var(--r-sm); background: var(--surface); }
.tk-person .tk-input { min-height: 44px; font-size: .98rem; }
.tk-person .nm { flex: 1 1 auto; min-width: 0; }

/* 토스트 */
.tk-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; z-index: 130; background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 999px; font-weight: 800; font-size: .92rem; transition: opacity .25s, transform .25s; pointer-events: none; max-width: calc(100% - 32px); text-align: center; }
.tk-toast.on { opacity: 1; transform: translate(-50%, 0); }

/* 설명 글 */
.tk-prose { margin-top: 28px; }
.tk-prose h2 { font-family: var(--display); font-weight: 400; font-size: 1.25rem; margin: 26px 0 8px; }
.tk-prose p, .tk-prose li { line-height: 1.75; }
.tk-prose details { border-top: 1px solid var(--border); padding: 4px 0; }
.tk-prose summary { min-height: 44px; display: flex; align-items: center; font-weight: 800; cursor: pointer; }
.tk-prose details p { margin: 0 0 12px; color: var(--text-sub); }
@media (prefers-reduced-motion: reduce) { .tk-pop { animation: none; } }

/* ---------- 테스트(한 문제씩) ---------- */
.qz-top { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.qz-bar { flex: 1 1 auto; height: 8px; border-radius: 999px; background: var(--surface); overflow: hidden; }
.qz-bar i { display: block; height: 100%; width: 0; background: var(--btn); border-radius: 999px; transition: width .45s cubic-bezier(.34,1.3,.64,1); }
.qz-num { font-weight: 900; font-size: .86rem; color: var(--text-sub); font-variant-numeric: tabular-nums; min-width: 44px; text-align: right; }
.qz-q { font-family: var(--display); font-weight: 400; font-size: clamp(1.3rem, 6vw, 1.6rem); line-height: 1.35; margin: 4px 0 16px; word-break: keep-all; }
.qz-opts { display: grid; gap: 10px; }
.qz-opt { width: 100%; min-height: 56px; padding: 12px 16px; text-align: left; border-radius: var(--r-sm); border: 1.5px solid var(--border); background: var(--card); color: var(--text); font: inherit; font-weight: 700; font-size: 1rem; line-height: 1.45; cursor: pointer; word-break: keep-all; }
.qz-opt[aria-pressed="true"] { background: var(--btn); color: var(--btn-ink); border-color: var(--btn); }
[data-skin="b"] .qz-opt { border-width: 2.5px; border-color: #141414; }
.qz-stage { position: relative; overflow: hidden; }
.qz-slide { animation: qzin .42s cubic-bezier(.2,.8,.2,1); }
.qz-slide.back { animation-name: qzback; }
@keyframes qzin { from { opacity: 0; transform: translateX(40px); } }
@keyframes qzback { from { opacity: 0; transform: translateX(-40px); } }
.qz-nav { display: flex; justify-content: space-between; margin-top: 14px; }
.qz-emoji { font-size: 3.4rem; line-height: 1; margin-top: 4px; }
.qz-meter { height: 14px; border-radius: 999px; background: var(--surface); overflow: hidden; margin: 12px 0 6px; }
.qz-meter i { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--c2), var(--pop)); transition: width 1.2s cubic-bezier(.34,1.2,.64,1); }
.qz-block { text-align: left; margin-top: 14px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--surface); }
.qz-block h3 { margin: 0 0 6px; font-size: .95rem; font-weight: 900; }
.qz-block p, .qz-block li { margin: 0; line-height: 1.6; font-weight: 600; }
.qz-block ul { margin: 0; padding-left: 18px; }
@media (prefers-reduced-motion: reduce) { .qz-slide { animation: none; } .qz-bar i, .qz-meter i { transition: none; } }

/* 결과 카드 창(2026-09-29) — TK.card. 높이 계산 없음(카톡 웹뷰 규칙: top·bottom 을 못 박는다) */
.tk-cardov { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 9000; background: var(--overlay, rgba(0,0,0,.5)); display: flex; align-items: center; justify-content: center; padding: 16px; animation: tkFade .18s ease-out; }
.tk-cardbox { position: relative; width: 100%; max-width: 400px; max-height: 100%; overflow-y: auto; background: var(--card); color: var(--text); border-radius: var(--r); border: var(--bw) solid var(--bc); padding: 52px 14px 16px; text-align: center; }
.tk-cardbox img { display: block; width: 100%; height: auto; border-radius: calc(var(--r-sm) * .6); box-shadow: 0 8px 24px -12px rgba(0,0,0,.4); }
.tk-cardx { position: absolute; top: 4px; right: 4px; width: 44px; height: 44px; border: 0; background: transparent; color: var(--text); font-size: 28px; line-height: 1; cursor: pointer; border-radius: 50%; }
.tk-cardhint { margin: 10px 0 0; font-size: .82rem; color: var(--text-sub); }
@keyframes tkFade { from { opacity: 0 } to { opacity: 1 } }
@media (prefers-reduced-motion: reduce) { .tk-cardov { animation: none } }
.tk-btn-main { background: var(--btn); color: var(--btn-ink); border-color: var(--btn); }

/* 신조어 단어 페이지(2026-09-29) */
.slg-page h1 small { font-size: .5em; color: var(--text-sub); font-family: var(--body); font-weight: 800; }
.slg-tag { display: inline-block; margin: 0 0 6px; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-weight: 800; font-size: .82rem; }
.slg-lead { font-size: 1.05rem; line-height: 1.7; }
.slg-def { padding: 16px; line-height: 1.7; margin: 14px 0 18px; }
.slg-def p { margin: 6px 0 0; display: grid; grid-template-columns: 5.6em 1fr; gap: 8px; align-items: baseline; }
.slg-def b { font-weight: 900; }
.slg-def .ex { display: block; margin-top: 10px; border: 1.5px solid var(--border); padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface); font-weight: 700; }
.slg-test { margin: 18px 0 0; }
.slg-go { display: inline-flex; align-items: center; min-height: 44px; margin-top: 6px; font-weight: 800; color: var(--accent-ink); }

/* 얼마면 돼 검색 입구(2026-09-29) */
.eg-go { padding: 16px; margin: 14px 0 20px; text-align: center; }
.eg-go p { margin: 0 0 12px; text-align: left; line-height: 1.65; }
.eg-go .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; }

/* 신조어 모음 페이지(2026-09-30) — 낱말 407쪽을 시대·갈래 15쪽으로 묶으면서 만든 목록
   ★표를 그대로 쓰면 360px 에서 옆으로 삐져나간다 → 작은 화면에서는 카드처럼 쌓는다 */
.slg-group h2 { margin-top: 28px; }
.slg-table { margin: 14px 0 20px; }
.slg-table table { width: 100%; border-collapse: collapse; }
.slg-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }  /* 작은 화면에선 머리글을 숨긴다(카드로 보이므로) */
.slg-table tr { display: block; margin: 0 0 10px; padding: 12px 14px; border: var(--bw, 1px) solid var(--bc, var(--border)); border-radius: var(--r-sm); background: var(--card); }
.slg-table th, .slg-table td { display: block; text-align: left; padding: 0; }
.slg-table th[scope="row"] { font-family: var(--display, inherit); font-size: 1.18rem; font-weight: 900; line-height: 1.3; }
.slg-table .slg-f { display: inline-block; margin-left: 8px; font-family: var(--body); font-size: .8rem; font-weight: 700; color: var(--text-sub); }
.slg-table td b { display: block; margin-top: 4px; font-weight: 800; line-height: 1.55; }
.slg-table .slg-u { display: block; margin-top: 4px; color: var(--text-sub); font-size: .92rem; line-height: 1.55; }
.slg-table .slg-x { display: block; margin-top: 8px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--surface); font-weight: 700; font-size: .92rem; line-height: 1.5; }
.slg-table .slg-s { display: block; margin-top: 6px; font-size: .88rem; color: var(--text-sub); }
.slg-table .slg-h { margin-top: 8px; font-size: .82rem; font-weight: 800; color: var(--accent-ink); }
.slg-table .slg-h:empty { display: none; }
/* 넓은 화면에서는 진짜 표로 — 한눈에 훑기 좋다 */
@media (min-width: 720px) {
  .slg-table thead { position: static; width: auto; height: auto; clip: auto; }
  .slg-table tr { display: table-row; margin: 0; padding: 0; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; background: none; }
  .slg-table th, .slg-table td { display: table-cell; padding: 12px 10px; vertical-align: top; }
  .slg-table thead th { font-size: .86rem; color: var(--text-sub); border-bottom: 2px solid var(--border); }
  .slg-table th[scope="row"] { width: 9.5em; }
  .slg-table .slg-h { width: 7em; margin-top: 0; }
}

/* ===== 오늘의 밸런스(2026-10-01) — 색은 스킨 토큰, 구조만 여기서 ===== */
.bl-date { text-align: center; font-size: .82rem; font-weight: 900; color: var(--text); background: var(--card); display: inline-block; margin: 0 auto 6px; padding: 5px 12px; border-radius: 999px; border: var(--bw, 1.5px) solid var(--bc, var(--border)); }
.bl-note { text-align: center; color: var(--text-sub); font-size: .82rem; font-weight: 700; margin: 0 0 26px; }
.bl-topic { text-align: center; font-size: .86rem; font-weight: 900; color: var(--accent-ink); margin: 0 0 8px; }
.bl-title { font-family: var(--display); font-weight: 400; font-size: 1.5rem; line-height: 1.32; text-align: center; margin: 0 0 24px; letter-spacing: -.01em; }

.bl-choices { display: flex; flex-direction: column; gap: 12px; }
.bl-opt { position: relative; min-height: 80px; border-radius: var(--r); border: var(--bw, 1.5px) solid var(--bc, var(--border)); padding: 16px 18px; text-align: left; cursor: pointer; display: flex; align-items: center; gap: 14px; font: inherit; color: var(--text); width: 100%; box-shadow: var(--card-sh); transition: transform .12s ease; }
.bl-opt:active { transform: scale(.98); }
/* ★스킨 색(c3/c4)에 기대지 않는다 — 카드 배경은 항상 흰색(--card), A/B 구분은
   파랑/빨강 고정색으로만 준다. 스킨마다 c3/c4 밝기가 달라 "B가 안 보인다"는 지적을
   두 번 받았다(2026-10-02). 고정색은 어느 스킨에서도 대비가 보장된다. */
.bl-opt { background: var(--card); }
.bl-opt .tag { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: .86rem; color: #fff; }
.bl-opt.a .tag { background: var(--bl-a); } .bl-opt.a { border-color: var(--bl-a); }
.bl-opt.b .tag { background: var(--bl-b); } .bl-opt.b { border-color: var(--bl-b); }
.bl-opt .txt { font-size: 1rem; font-weight: 800; line-height: 1.4; color: var(--text); }

.bl-bar-wrap { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.bl-bar-row { border-radius: var(--r); border: var(--bw, 1.5px) solid var(--bc, var(--border)); padding: 14px 16px; box-shadow: var(--card-sh); background: var(--card); }
.bl-bar-row.a { border-color: var(--bl-a); } .bl-bar-row.b { border-color: var(--bl-b); }
.bl-bar-row.mine { box-shadow: var(--card-sh), 0 0 0 2px var(--text) inset; }
.bl-bar-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.bl-bar-top .txt { font-size: .9rem; font-weight: 800; display: flex; align-items: center; gap: 8px; color: var(--text); }
.bl-bar-top .pct { font-size: 1.15rem; font-weight: 900; font-variant-numeric: tabular-nums; }
/* ★퍼센트 숫자는 파랑/빨강 고정색 대신 --text 를 쓴다 — 어두운 스킨(d)의 어두운 카드
   배경 위에서는 저 두 색도 대비가 모자라 다시 흐려질 수 있다. --text 는 카드 배경과
   항상 맞춰 설계된 값이라 어느 스킨에서도 보장된다. */
.bl-bar-top .pct { color: var(--text); }
.bl-mine { font-size: .68rem; font-weight: 900; background: var(--text); color: var(--bg); padding: 3px 8px; border-radius: 999px; }
.bl-track { height: 10px; border-radius: 999px; background: var(--surface); overflow: hidden; }
.bl-fill { height: 100%; border-radius: 999px; width: 0; transition: width .6s cubic-bezier(.2,.8,.2,1); }
.bl-bar-row.a .bl-fill { background: var(--bl-a); } .bl-bar-row.b .bl-fill { background: var(--bl-b); }
.bl-total { text-align: center; color: var(--text-sub); font-size: .8rem; font-weight: 700; margin: -4px 0 18px; }

.bl-reactions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 18px; }
.bl-react { min-height: 44px; display: inline-flex; align-items: center; border: var(--bw, 1.5px) solid var(--bc, var(--border)); background: var(--card); border-radius: 999px; padding: 8px 13px; font-size: .82rem; font-weight: 800; cursor: pointer; color: var(--text); }
.bl-react .n { color: var(--text-sub); font-weight: 700; font-variant-numeric: tabular-nums; margin-left: 2px; }
.bl-react.on { background: var(--accent); color: var(--on-accent, #fff); border-color: var(--bc, var(--border)); }
.bl-react.on .n { color: var(--on-accent, #fff); }

.bl-foot { text-align: center; margin-top: 28px; color: var(--text-sub); font-size: .8rem; font-weight: 700; }
/* 「읽을거리 더 보기」 글자 링크 — 보이는 모양은 그대로, 누르는 자리만 44px(2026-10-03 실측 19px) */
.more-link { display: inline-flex; align-items: center; min-height: 44px; }
