/* ─────────────────────────────────────────────
 * 한봇 윷놀이 (2026-11-13) — specs/yut.md §4 디자인 토큰. 소재: 마당에 편 멍석, 먹으로 찍은 밭, 오방색 말, 박달나무 윷가락
 * 짚 그늘 밤 #2d2a1f(바탕) · 상자 #3a3627 · 멍석 #b99459 · 짜임 #8f6d3a · 먹 #1f1c17 · 옥색 #6cc3b5(내 차례·도착 밭)
 * 말 오방색: 홍 #c8423b ● · 청 #2f6fb0 ▲ · 황 #e0b23a ■ · 녹 #3a8a5c ◆ — 색과 모양을 함께 써서 색만으로 구별하지 않음
 * 시그니처(하나): 윷가락 던지기(.yt-stick.toss) — 응답이 온 뒤 가락 4개가 솟아 돌다 떨어져 면을 보여 줌.
 * 배치·단추·설정 칸은 공용 public/css/boardgame/room.css — 여기선 토큰과 윷판만.
 * ───────────────────────────────────────────── */
.yt-root, .chat-fab, .chat-panel {
    --yt-night: #2d2a1f;
    --yt-night-2: #3a3627;
    --yt-mat: #b99459;
    --yt-weave: #8f6d3a;
    --yt-ink: #1f1c17;
    --yt-jade: #6cc3b5;
    --yt-s0: #c8423b;
    --yt-s1: #2f6fb0;
    --yt-s2: #e0b23a;
    --yt-s3: #3a8a5c;
    --yt-flat: #ecd4a0;
    --yt-round: #6e4626;
    --bg-bg: var(--yt-night);
    --bg-panel: var(--yt-night-2);
    --bg-line: color-mix(in srgb, var(--yt-mat) 18%, var(--yt-night-2));
    --bg-ink: #f2eee3;
    --bg-dim: color-mix(in srgb, #f2eee3 60%, var(--yt-night));
    --bg-accent: var(--yt-jade);
    --bg-accent-ink: #12261f;
    --bg-warn: #e0703f;
    --chat-accent: var(--yt-jade);
    --chat-accent-ink: #12261f;
}
.yt-board { width: 100%; display: grid; grid-template-columns: 1fr; gap: 12px; touch-action: manipulation; align-items: start; }
.yt-stage { position: relative; width: min(100%, var(--bg-board)); margin: 0 auto; }
.yt-panel { display: grid; gap: 10px; align-content: start; min-width: 0; }
@media (min-width: 900px) {
    .yt-board { grid-template-columns: minmax(0, var(--bg-board)) minmax(220px, 320px); justify-content: center; }
    .yt-stage { width: 100%; }
    .yt-panel .yt-sides { grid-template-columns: 1fr; }
}
.yt-svg { width: 100%; display: block; aspect-ratio: 104 / 106; }
.yt-mat { fill: url(#yt-mattex) var(--yt-mat); }
.yt-line { stroke: var(--yt-ink); stroke-width: 0.55; fill: none; opacity: 0.75; stroke-linecap: round; }
.yt-node { fill: var(--yt-mat); stroke: var(--yt-ink); stroke-width: 0.9; }
.yt-node.big { stroke-width: 0.8; }
.yt-node-rim { fill: none; stroke: var(--yt-ink); stroke-width: 0.6; }
.yt-label { font-size: 3.2px; fill: var(--yt-ink); font-weight: 700; }
.yt-tok image { filter: drop-shadow(0 0.5px 0.6px rgba(18, 15, 11, 0.7)); }
.yt-ring { fill: none; stroke: none; }
.yt-hit { fill: transparent; }
.yt-piece.can { cursor: pointer; }
.yt-piece.can .yt-ring { stroke: #fff; stroke-width: 0.7; fill: rgba(255, 255, 255, 0.18); }
.yt-piece.pick .yt-ring { stroke: var(--yt-jade); stroke-width: 1.1; fill: color-mix(in srgb, var(--yt-jade) 25%, transparent); }
.yt-piece:focus-visible, .yt-dest:focus-visible { outline: none; }
.yt-piece:focus-visible .yt-hit, .yt-dest:focus-visible .yt-hit { stroke: var(--yt-jade); stroke-width: 0.8; stroke-dasharray: 1.4 1; }
.yt-count { font-size: 3.6px; font-weight: 800; fill: #fff; paint-order: stroke; stroke: var(--yt-ink); stroke-width: 0.9px; }
.yt-dest { cursor: pointer; }
.yt-destring { fill: color-mix(in srgb, var(--yt-jade) 30%, transparent); stroke: var(--yt-jade); stroke-width: 0.9; }
.yt-mark { font-size: 4px; font-weight: 800; fill: var(--yt-ink); paint-order: stroke; stroke: var(--yt-jade); stroke-width: 0.8px; }
.yt-lastring { fill: none; stroke: var(--bg-ink); stroke-width: 0.5; stroke-dasharray: 1.2 1; opacity: 0.85; transform-box: fill-box; transform-origin: center; }
.yt-lastring.pop { animation: yt-pop 0.4s ease-out 1; }
@keyframes yt-pop { from { transform: scale(0.4); opacity: 0; } to { transform: scale(1); opacity: 0.85; } }
.yt-mini { width: 20px; height: 20px; display: inline-block; vertical-align: middle; flex: none; }
.yt-mini.w { width: 14px; height: 14px; }

/* 시그니처 — 윷가락 */
.yt-sticks { position: relative; display: grid; grid-template-columns: 1fr; gap: 6px; justify-items: center; padding: 12px 10px; background: color-mix(in srgb, var(--yt-mat) 22%, var(--bg-panel)); border: 1px solid var(--bg-line); border-radius: 12px; min-height: 120px; align-content: center; overflow: hidden; }
.yt-sticks.idle { opacity: 0.35; }
.yt-stick { display: block; width: min(86%, 230px); height: auto; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.45)); }
.yt-stick.round { filter: url(#yt-darkwood) drop-shadow(0 2px 3px rgba(0, 0, 0, 0.45)); }
.yt-filters { position: absolute; width: 0; height: 0; overflow: hidden; }
.yt-stick.toss { animation: yt-toss 0.8s cubic-bezier(0.25, 0.7, 0.35, 1) both; animation-delay: calc(var(--i) * 0.04s); }
@keyframes yt-toss {
    0% { transform: translateY(0) rotate(0); }
    35% { transform: translateY(-120%) rotate(calc(150deg + var(--i) * 40deg)) scale(0.85); }
    70% { transform: translateY(15%) rotate(calc(340deg + var(--i) * 10deg)) scale(1); }
    85% { transform: translateY(-30%) rotate(356deg); }
    100% { transform: translateY(0) rotate(360deg); }
}
.yt-word { position: absolute; left: 50%; top: 50%; margin-top: -0.7em; transform: translateX(-50%); font-family: "hb-games-display", var(--font-sans); font-size: clamp(1.4rem, 1rem + 2vw, 3rem); color: var(--bg-ink); text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7); white-space: nowrap; animation: yt-word 0.5s ease-out 0.75s both; }
.yt-word.calm { animation: yt-fade 0.2s ease-out both; }
.yt-word.pic { display: inline-flex; align-items: center; gap: 0.2em; margin-top: -1.1em; }
.yt-res { width: 2.2em; height: 2.2em; filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.6)); }
@keyframes yt-word { from { opacity: 0; transform: translateX(-50%) scale(1.6); } to { opacity: 1; transform: translateX(-50%) scale(1); } }
@keyframes yt-fade { from { opacity: 0; } to { opacity: 1; } }

/* 자리띠 */
.yt-sides { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 6px; }
.yt-side { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--bg-panel); border: 1px solid var(--bg-line); border-radius: 10px; padding: 6px 10px; font-size: 0.84rem; color: var(--bg-ink); }
.yt-side.turn { border-color: var(--yt-jade); box-shadow: 0 0 0 1px var(--yt-jade); }
.yt-side.me .yt-sname { font-weight: 800; }
.yt-sname { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%; }
.yt-sname small { color: var(--bg-dim); }
.yt-wait { display: inline-flex; gap: 1px; }
.yt-done, .yt-wins { margin-left: auto; color: var(--bg-dim); font-size: 0.78rem; }
.yt-wins { margin-left: 0; }

/* 결과 칩·단추 */
.yt-ctrl { display: grid; gap: 8px; }
.yt-chips { display: flex; gap: 6px; flex-wrap: wrap; min-height: 38px; align-items: center; }
.yt-chip { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.1; min-width: 52px; font-weight: 800; font-size: 1rem; }
.yt-chip small { font-size: 0.66rem; font-weight: 400; opacity: 0.8; }
.yt-chip-ic { width: clamp(28px, 1.4rem + 0.6vw, 40px); height: clamp(28px, 1.4rem + 0.6vw, 40px); margin-bottom: 1px; }
.yt-acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.yt-throw { min-width: min(100%, 240px); font-size: 1.05rem; }
.yt-throw kbd { font-size: 0.7rem; opacity: 0.7; font-family: inherit; }
.yt-ask { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: var(--bg-panel); border: 1px solid var(--yt-jade); border-radius: 10px; padding: 8px 10px; color: var(--bg-ink); font-size: 0.85rem; }
.yt-odds { font-size: 0.82rem; color: var(--bg-dim); }
.yt-odds summary { cursor: pointer; color: var(--bg-ink); }
.yt-odds ul { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.yt-odds li { display: flex; gap: 6px; }
.yt-odds b { color: var(--bg-ink); }

@media (max-width: 640px) {
    .yt-stage { width: 100%; }
    .yt-sticks { min-height: 76px; padding: 8px; grid-template-columns: 1fr 1fr; }
    .yt-stick { width: 92%; }
    .yt-throw { width: 100%; }
    .yt-side { font-size: 0.78rem; padding: 5px 8px; }
}
@media (min-width: 2400px) {
    .yt-side { font-size: 1.05rem; }
    .yt-chip { font-size: 1.25rem; min-width: 70px; }
    .yt-mini { width: 28px; height: 28px; }
}
@media (prefers-reduced-motion: reduce) {
    .yt-stick.toss, .yt-lastring.pop { animation: none; }
    .yt-word { animation: yt-fade 0.2s ease-out both; }
}
