/* =========================================================
   애매해 도구 공용 부품 — 스킨 변수(--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-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; } }
