/* ─────────────────────────────────────────────
 * 한봇 홀덤 (2026-11-13) — specs/holdem.md §4-1 디자인 토큰 "기원의 오후". 소재: 기원 오후 햇살 아래 비자나무 바둑판과 바둑돌
 * 비자나무 판 #D3B37A(상) · 판 그림자 #8C6B3E(상 테두리) · 먹 #1F2326(바깥 바탕·글자) · 흰 돌 #ECEAE4(카드 면·흰 점수 돌) · 청자 #6F9C93(내 차례·강조) · 주 #B5483A(♥♦·모두 걸기)
 * 카지노 녹색 깔개·칩 모양 금지 — 점수 돌은 바둑돌 모양(흰 1 · 검은 10 · 청자 테 100 · 주홍 테 1,000).
 * 시그니처(하나, 2026-11-19 체력형): 가운데 압박 단계 칸 세 개(.hd-level.big) — 올라간 만큼 칸이 참. 점수 돌 무더기(.hd-stones·.hd-fly)는 쓰지 않음.
 * 배치·단추·설정 칸은 공용 public/css/boardgame/room.css, 카드 그림은 public/css/boardgame/trump-cards.css — 여기선 토큰과 상만.
 * ───────────────────────────────────────────── */
.hd-root, .chat-fab, .chat-panel {
    --hd-wood: #d3b37a;
    --hd-shadow: #8c6b3e;
    --hd-ink: #1f2326;
    --hd-stone: #eceae4;
    --hd-celadon: #6f9c93;
    --hd-vermil: #b5483a;
    --bg-bg: var(--hd-ink);
    --bg-panel: color-mix(in srgb, var(--hd-shadow) 16%, var(--hd-ink));
    --bg-line: color-mix(in srgb, var(--hd-wood) 22%, var(--hd-ink));
    --bg-ink: var(--hd-stone);
    --bg-dim: color-mix(in srgb, var(--hd-stone) 62%, var(--hd-ink));
    --bg-accent: var(--hd-celadon);
    --bg-accent-ink: #10201c;
    --bg-warn: var(--hd-vermil);
    --chat-accent: var(--hd-celadon);
    --chat-accent-ink: #10201c;
}
.hd-root { --hb-card-face: var(--hd-stone); --hb-card-edge: #c9c2b2; --hb-card-red: var(--hd-vermil); --hb-card-ink: var(--hd-ink); --hb-card-back: var(--hd-shadow); --hb-card-back-2: var(--hd-celadon); }
.hd-notice { margin: 0 0 12px; padding: 8px 12px; border-radius: 10px; background: var(--bg-panel); border: 1px solid var(--bg-line); color: var(--bg-dim); font-size: 0.84rem; line-height: 1.5; }
.hd-notice b { color: var(--hd-celadon); margin-right: 6px; }
.hd-board { width: min(100%, calc(var(--bg-board) * 1.05)); display: flex; flex-direction: column; gap: 10px; --hd-card: clamp(40px, calc(var(--bg-board) * 0.085), 120px); color: var(--bg-ink); }
.hd-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 0.84rem; color: var(--bg-dim); }
.hd-top b { color: var(--bg-ink); }
.hd-play { border: 1px solid var(--bg-line); border-radius: 999px; padding: 1px 9px; font-size: 0.74rem; }
.hd-help { position: relative; margin-left: auto; }
.hd-help summary { list-style: none; cursor: pointer; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-panel); border: 1px solid var(--bg-line); color: var(--bg-ink); font-weight: 800; }
.hd-help summary::-webkit-details-marker { display: none; }
.hd-help summary:focus-visible { outline: 3px solid var(--hd-celadon); outline-offset: 2px; }
.hd-help[open] > :not(summary) { position: absolute; right: 0; z-index: 5; }
.hd-help[open] .hd-ranks { top: 32px; width: min(320px, 86vw); margin: 0; padding: 10px 12px 10px 30px; background: var(--bg-panel); border: 1px solid var(--bg-line); border-radius: 12px; display: grid; gap: 3px; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4); }
.hd-ranks li { font-size: 0.8rem; }
.hd-ranks span { color: var(--bg-dim); }
/* 상 — 비자나무 판 */
.hd-table {
    position: relative; width: 100%; aspect-ratio: 16 / 10.5;
    background:
        radial-gradient(ellipse at 38% 30%, rgba(255, 244, 214, 0.28), transparent 60%),
        url("/img/holdem/art/ui/table.webp") center / cover no-repeat,
        var(--hd-wood);
    border-radius: 50% / 46%;
    box-shadow: inset 0 0 0 7px var(--hd-shadow), inset 0 0 0 9px color-mix(in srgb, var(--hd-shadow) 60%, #000), 0 12px 28px rgba(0, 0, 0, 0.45);
}
.hd-seats { list-style: none; margin: 0; padding: 0; }
.hd-seat { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 1px; max-width: 22%; text-align: center; z-index: 2; }
.hd-sname { background: rgba(31, 35, 38, 0.78); color: var(--hd-stone); font-size: 0.78rem; font-weight: 700; border-radius: 999px; padding: 2px 9px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-flex; gap: 4px; align-items: center; }
.hd-snm { min-width: 0; overflow: hidden; text-overflow: ellipsis; } /* 이름 글자를 따로 감싸야 inline-flex 안에서 말줄임이 된다(긴 닉네임이 잘린 채 끝나던 것) */
.hd-seat.turn .hd-sname { background: var(--hd-celadon); color: var(--bg-accent-ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--hd-celadon) 45%, transparent); }
.hd-seat.me .hd-sname { outline: 1px solid var(--hd-stone); }
.hd-seat.folded { opacity: 0.6; }
.hd-seat.out { opacity: 0.42; }
.hd-smarks { display: inline-flex; gap: 3px; }
.hd-mark { font-size: 0.64rem; font-weight: 800; border-radius: 6px; padding: 0 4px; background: var(--hd-stone); color: var(--hd-ink); }
.hd-mark.is-btn { background: var(--hd-ink); color: var(--hd-wood); border: 1px solid var(--hd-wood); }
.hd-sstack { display: inline-flex; align-items: center; gap: 3px; font-size: 0.8rem; color: var(--hd-ink); font-weight: 800; }
.hd-sstate { font-size: 0.72rem; color: var(--hd-ink); min-height: 1em; }
.hd-allin { color: var(--hd-vermil); }
.hd-scards { display: flex; min-height: calc(var(--hd-card) * 0.62); }
.hd-scards .hb-card { --hb-card-w: calc(var(--hd-card) * 0.44); }
.hd-scards .hb-card + .hb-card { margin-left: calc(var(--hd-card) * -0.14); }
.hd-scards .show { --hb-card-w: calc(var(--hd-card) * 0.62); }
.hd-center { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 8px; width: 58%; }
.hd-boardcards { display: flex; gap: calc(var(--hd-card) * 0.08); }
.hd-boardcards .hb-card, .hd-slot { --hb-card-w: var(--hd-card); width: var(--hd-card); }
.hd-boardcards.two .hb-card, .hd-boardcards.two .hd-slot { --hb-card-w: calc(var(--hd-card) * 0.72); width: calc(var(--hd-card) * 0.72); }
.hd-slot { aspect-ratio: 5 / 7; border-radius: 5px; border: 1.5px dashed color-mix(in srgb, var(--hd-shadow) 70%, transparent); }
.hd-pot { display: grid; justify-items: center; gap: 2px; color: var(--hd-ink); font-size: 0.85rem; }
.hd-pot b { font-size: 1.05rem; }
.hd-side { font-size: 0.74rem; color: color-mix(in srgb, var(--hd-ink) 80%, var(--hd-shadow)); }
.hd-wait { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); margin: 0; color: var(--hd-ink); font-weight: 700; }
/* 시그니처 — 점수 돌(바둑돌 모양) */
.hd-stones { display: block; height: auto; }
.hd-stones.big { width: clamp(70px, calc(var(--hd-card) * 1.7), 210px); }
.hd-stones.mini { width: calc(var(--hd-card) * 0.5); max-width: 40px; }
.hd-fly { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%); z-index: 3; pointer-events: none; opacity: 0; animation: hd-slide 1.1s cubic-bezier(0.5, 0.05, 0.25, 1) 0.25s both; }
@keyframes hd-slide { from { left: 50%; top: 58%; opacity: 1; } 75% { opacity: 1; } to { left: var(--x); top: var(--y); opacity: 0; } }
.hd-result { background: var(--bg-panel); color: var(--hd-stone); border: 1px solid var(--hd-celadon); border-left-width: 4px; border-radius: 12px; padding: 8px 14px; font-size: 0.9rem; }
.hd-result p { margin: 2px 0; }
.hd-result small { color: var(--bg-dim); }
.hd-hand { font-family: "hb-games-display", var(--font-sans); color: var(--hd-wood); font-weight: 400; letter-spacing: 0.02em; }
/* 내 자리 */
.hd-me { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "hole info" "hole acts" "raise raise"; gap: 6px 14px; align-items: center; background: var(--bg-panel); border: 1px solid var(--bg-line); border-radius: 14px; padding: 10px 12px; }
.hd-hole { grid-area: hole; display: flex; gap: 6px; }
.hd-hole .hb-card { --hb-card-w: calc(var(--hd-card) * 1.25); }
.hd-meinfo { grid-area: info; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 0.9rem; color: var(--bg-dim); }
.hd-meinfo b { color: var(--bg-ink); }
.hd-acts { grid-area: acts; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hd-acts .bg-note { margin: 0; }
.hd-acts kbd { font-size: 0.68rem; opacity: 0.7; margin-left: 2px; }
.hd-fold { background: transparent; color: var(--bg-ink); border: 1px solid var(--bg-line); }
.hd-allbtn { background: var(--hd-vermil); color: #fff; }
.hd-raise { grid-area: raise; display: grid; gap: 8px; border-top: 1px dashed var(--bg-line); padding-top: 8px; }
.hd-range { width: 100%; accent-color: var(--hd-celadon); }
.hd-range:focus-visible, .hd-board .bg-btn:focus-visible, .hd-board .bg-chip:focus-visible, .hd-board .bg-mini:focus-visible { outline: 3px solid var(--hd-celadon); outline-offset: 2px; }
.hd-spectate { text-align: center; }
.hd-log { list-style: none; margin: 0; padding: 0; font-size: 0.78rem; color: var(--bg-dim); display: grid; gap: 2px; }
.hd-log li:first-child { color: var(--bg-ink); }
.hd-dot { display: block; width: 14px; height: 14px; border-radius: 50%; background: var(--hd-stone); border: 2px solid var(--hd-shadow); }
.hd-dot.is-btn { background: var(--hd-ink); border-color: var(--hd-wood); }
.hd-dot.out { background: transparent; }
@media (max-width: 640px) {
    .hd-board { width: 100%; --hd-card: clamp(36px, 11vw, 56px); }
    .hd-table { aspect-ratio: auto; border-radius: 18px; padding: 10px; display: grid; gap: 10px; box-shadow: inset 0 0 0 4px var(--hd-shadow), 0 8px 18px rgba(0, 0, 0, 0.4); }
    .hd-seats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
    .hd-seat { position: static; transform: none; max-width: none; grid-template-columns: auto 1fr; grid-template-areas: "name name" "marks marks" "cards stack" "cards state"; justify-items: start; align-items: center; column-gap: 6px; background: rgba(255, 248, 230, 0.35); border-radius: 10px; padding: 4px 6px; text-align: left; }
    .hd-seat.turn { box-shadow: 0 0 0 2px var(--hd-celadon); }
    .hd-sname { grid-area: name; font-size: 0.72rem; min-width: 0; }
    .hd-smarks { grid-area: marks; }
    .hd-scards { grid-area: cards; min-height: 0; }
    .hd-sstack { grid-area: stack; }
    .hd-sstate { grid-area: state; }
    .hd-center, .hd-wait { position: static; transform: none; width: 100%; }
    .hd-fly { display: none; }
    .hd-me { grid-template-columns: 1fr; grid-template-areas: "hole" "info" "acts" "raise"; justify-items: center; }
    .hd-acts { justify-content: center; }
    .hd-acts .bg-btn { flex: 1 1 40%; }
}
@media (min-width: 2400px) {
    .hd-board { width: min(100%, 1600px, calc(70vh * 1.78)); --hd-card: clamp(48px, 3.4vw, 140px); }
    .hd-sname, .hd-sstack { font-size: 1.05rem; }
    .hd-top, .hd-result { font-size: 1.05rem; }
}
@media (prefers-reduced-motion: reduce) {
    .hd-fly { animation: none; display: none; }
}

/* 체력형(2026-11-19) — 압박 단계 칸·체력·잃은 체력 */
.hd-level { display: inline-flex; gap: 4px; align-items: center; }
.hd-pip { width: 12px; height: 12px; border-radius: 3px; border: 2px solid var(--hd-wood); background: transparent; box-sizing: border-box; }
.hd-pip.on { background: var(--hd-vermil); border-color: var(--hd-vermil); }
.hd-level.big .hd-pip { width: 22px; height: 22px; border-radius: 5px; }
.hd-hp { color: var(--bg-ink); white-space: nowrap; }
.hd-lost { color: var(--hd-vermil); }

