/* ─────────────────────────────────────────────
 * 한봇 하트 (2026-11-13) — specs/hearts.md §4-1 디자인 토큰 "겨울 뜨개". 소재: 남색 털실 무릎 담요 위에 펼친 카드, 뜨개 바구니의 실타래
 * 남색 털실 #26324A(판) · 짙은 남 #1B2436(자리 칸) · 진홍 #9E2B3A(♥·벌점) · 솔잎 #3E6B52(넘기기 화살표·안전) · 눈 #EEF1F4(카드 면) · 털실 회 #9AA3B5(흐린 글)
 * 시그니처(하나): 자리마다 '벌점 실타래'(.ht-yarn) — 이번 판 벌점만큼 감겨 굵어지고 ♠Q가 들어가면 검은 실 한 바퀴. 그 밖 연출 없음.
 * 배치·단추·설정 칸은 공용 public/css/boardgame/room.css, 카드 그림은 public/css/boardgame/trump-cards.css — 여기선 토큰과 카드판만.
 * ───────────────────────────────────────────── */
.ht-root, .chat-fab, .chat-panel {
    --ht-navy: #26324a;
    --ht-deep: #1b2436;
    --ht-crimson: #9e2b3a;
    --ht-pine: #3e6b52;
    --ht-snow: #eef1f4;
    --ht-grey: #9aa3b5;
    --bg-bg: var(--ht-deep);
    --bg-panel: color-mix(in srgb, var(--ht-navy) 82%, var(--ht-deep));
    --bg-line: color-mix(in srgb, var(--ht-grey) 22%, var(--ht-navy));
    --bg-ink: var(--ht-snow);
    --bg-dim: var(--ht-grey);
    --bg-accent: #d8818c;
    --bg-accent-ink: #2a0f15;
    --bg-warn: #e06a6a;
    --chat-accent: #d8818c;
    --chat-accent-ink: #2a0f15;
}
.ht-root { --hb-card-face: var(--ht-snow); --hb-card-edge: #c9d0db; --hb-card-red: var(--ht-crimson); --hb-card-ink: #1b2030; --hb-card-back: var(--ht-crimson); --hb-card-back-2: var(--ht-snow); }
.ht-board { width: min(100%, calc(var(--bg-board) * 1.15)); display: flex; flex-direction: column; gap: 10px; --ht-card: clamp(46px, calc(var(--bg-board) * 0.085), 128px); }
/* 판 — 뜨개 무늬(겉뜨기 V자) 담요 */
.ht-table { position: relative; width: 100%; aspect-ratio: 16 / 10; border-radius: 22px; background-color: var(--ht-navy);
    background-image: url("/img/hearts/art/ui/table.webp"); background-position: center;
    background-size: cover; box-shadow: inset 0 0 0 5px var(--ht-deep), 0 10px 26px rgba(0, 0, 0, 0.35); }
.ht-head { position: absolute; left: 12px; top: 10px; display: flex; gap: 10px; flex-wrap: wrap; font-size: 0.78rem; color: var(--ht-grey); }
.ht-broken { display: inline-flex; gap: 4px; align-items: center; color: #f0b7bf; }
.ht-broken .hbc-suit { width: 0.9em; height: 0.9em; }
.ht-seat { position: absolute; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 2px; text-align: center; max-width: 30%; background: color-mix(in srgb, var(--ht-deep) 88%, transparent); border: 1px solid var(--bg-line); border-radius: 14px; padding: 6px 10px; }
.ht-seat.r0 { left: 50%; top: 88%; }
.ht-seat.r1 { left: 11%; top: 50%; }
.ht-seat.r2 { left: 50%; top: 13%; }
.ht-seat.r3 { left: 89%; top: 50%; }
.ht-seat.turn { border-color: var(--bg-accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--bg-accent) 45%, transparent); }
.ht-sname { font-size: 0.8rem; font-weight: 700; color: var(--ht-snow); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ht-ssub { font-size: 0.72rem; color: var(--ht-grey); font-variant-numeric: tabular-nums; }
.ht-ssub b { color: var(--ht-snow); }
/* 시그니처 — 벌점 실타래 */
.ht-yarn { width: calc(var(--ht-card) * 0.62); height: calc(var(--ht-card) * 0.62); display: block; overflow: visible; }
.ht-ball { transform-box: view-box; transform-origin: 20px 20px; transition: transform 0.4s ease; }
.bg-sicon .ht-yarn { width: 26px; height: 26px; }
.ht-dot { display: block; width: 12px; height: 12px; border-radius: 50%; background: var(--ht-pine); }
.ht-center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 52%; height: 56%; display: grid; place-items: center; }
.ht-trick { position: relative; width: 100%; height: 100%; }
.ht-tc { position: absolute; transform: translate(-50%, -50%); }
.ht-tc .hb-card { --hb-card-w: var(--ht-card); }
.ht-tc.r0 { left: 50%; top: 72%; }
.ht-tc.r1 { left: 28%; top: 50%; }
.ht-tc.r2 { left: 50%; top: 28%; }
.ht-tc.r3 { left: 72%; top: 50%; }
.ht-lastnote { position: absolute; bottom: 0; font-size: 0.72rem; color: var(--ht-grey); }
.ht-passinfo { display: grid; justify-items: center; gap: 4px; color: var(--ht-snow); text-align: center; }
.ht-passinfo small { color: var(--ht-grey); }
.ht-arrow { width: 2.4em; height: 2.4em; fill: color-mix(in srgb, var(--ht-pine) 70%, #fff); }
.bg-btn .ht-arrow { width: 1.2em; height: 1.2em; vertical-align: -0.2em; fill: currentColor; }
.ht-wait { color: var(--ht-snow); margin: 0; text-align: center; }
.ht-interlude { background: color-mix(in srgb, var(--ht-deep) 94%, transparent); color: var(--bg-ink); border: 1px solid var(--bg-accent); border-radius: 14px; padding: 12px 16px; font-size: 0.85rem; min-width: 80%; }
.ht-interlude b { font-family: "hb-games-display", var(--font-sans); font-size: 1.1rem; }
.ht-interlude ol { margin: 6px 0; padding-left: 1.2em; font-variant-numeric: tabular-nums; }
.ht-moon { margin: 4px 0; color: #f0b7bf; font-family: "hb-games-display", var(--font-sans); display: flex; align-items: center; gap: 8px; }
.ht-moon-ic { width: clamp(40px, 3vw, 72px); height: auto; flex: none; }
/* 손패 — 13장 한 줄 겹쳐 펼침(노출 52%) */
.ht-handbar { display: grid; gap: 8px; }
.ht-hand { display: flex; justify-content: center; padding: 16px 4px 4px; overflow-x: auto; }
.ht-card { --hb-card-w: var(--ht-card); flex: none; width: var(--ht-card); aspect-ratio: 5 / 7; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 6px; transition: transform 0.15s; opacity: 0.55; margin-left: calc(var(--ht-card) * -0.48); }
.ht-card:first-child { margin-left: 0; }
.ht-card svg { width: 100%; height: 100%; display: block; }
.ht-card.can { opacity: 1; }
.ht-card.new { transform: translateY(-5px); }
.ht-card.up { transform: translateY(-14px); }
.ht-card.cur { box-shadow: 0 0 0 2px var(--bg-accent); }
.ht-card:focus-visible { outline: 3px solid var(--bg-accent); outline-offset: 2px; position: relative; z-index: 1; }
.ht-handact { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: center; }
.ht-score caption { text-align: left; font-size: 0.78rem; color: var(--bg-dim); padding-bottom: 4px; }
.ht-score tr.me td { color: var(--bg-accent); font-weight: 700; }
.ht-spectate { text-align: center; }
@media (max-width: 640px) {
    .ht-board { width: 100%; --ht-card: min(46px, calc((100vw - 32px) / 6.8)); }
    .ht-table { aspect-ratio: 1 / 1.05; }
    .ht-seat { padding: 4px 6px; max-width: 34%; }
    .ht-seat.r1 { left: 16%; }
    .ht-seat.r3 { left: 84%; }
    .ht-center { width: 64%; height: 50%; }
    .ht-wait { max-width: 62%; font-size: 0.8rem; word-break: keep-all; }   /* 기다림 안내가 좌우 '빈자리' 이름표와 겹치던 것 */
    .ht-passinfo { max-width: 60%; font-size: 0.78rem; word-break: keep-all; }   /* 카드 넘기기 안내도 좌우 자리 상자와 겹치지 않게 */
    .ht-sname { font-size: 0.7rem; }
    .ht-head { font-size: 0.7rem; }
}
@media (min-width: 2400px) {
    .ht-board { --ht-card: clamp(46px, 3vw, 128px); }
    .ht-sname { font-size: 1rem; }
    .ht-ssub { font-size: 0.9rem; }
}
@media (prefers-reduced-motion: reduce) {
    .ht-card, .ht-ball { transition: none; }
}
