/* 머니업 홀덤 확률 계산기 — `assets/js/holdem-calc.js`.
 *
 * 지도 홈의 왼쪽 창(`.hcalc`)과 따로 선 한 장(`/holdem-calculator/`)이 같은 규칙을 쓴다.
 * 창 폭이 PC 에서도 460px 이라 **화면 폭이 아니라 계산기 폭**으로 배치를 바꾼다(@container).
 * `app.css` 에 넣지 않는다 — 여러 세션이 그 파일을 동시에 고친다(news-panel.css 와 같은 판단).
 * 모든 클래스가 `hc-` 로 시작한다 — app.css 의 맨 클래스(`.card`·`.chip` 등)에 안 잡히게.
 *
 * 색은 참고 앱을 옮기지 않고 머니업 것으로 정했다: 짙은 흑록 바탕 · 에메랄드 판 · 가라앉은 금색 · 아이보리 글자.
 */

/* ── 지도 홈의 왼쪽 창 ── news-panel.css 의 `.newsp` 와 같은 자리 규칙 */
.hcalc {
  position: absolute;
  left: 0; right: 0;
  top: var(--roll, 0px); bottom: 0;
  z-index: 11;
  display: flex;
  transform: translateX(0);
  transition: transform 0.22s ease;
}
.hcalc[hidden] { display: flex !important; transform: translateX(-105%); visibility: hidden; pointer-events: none; transition: transform 0.22s ease, visibility 0s 0.22s; }
/* 폭은 채팅·예약 창(`.page`)과 같은 왼쪽 기둥 `--sidew`(380px)다(2026-09-15 지시 — 전엔 460px). */
@media (min-width: 900px) {
  .hcalc { right: auto; width: var(--sidew, 380px); box-shadow: 8px 0 28px rgba(0, 0, 0, 0.22); }
}
@media (prefers-reduced-motion: reduce) { .hcalc, .hcalc[hidden] { transition: none; } }

/* ── 따로 선 한 장 ── */
.hc-pagebody { margin: 0; min-height: 100vh; min-height: 100dvh; background: #040a08; }
.hc-pagehost { height: 100vh; height: 100dvh; max-width: 760px; margin: 0 auto; display: flex; }

/* ═════════════ 판 ═════════════ */
.hc-host { color-scheme: dark; }
.hc {
  --hc-bg: #07110d;
  --hc-bg2: #0a1813;
  --hc-panel: #0f221b;
  --hc-panel2: #132b22;
  --hc-line: rgba(214, 178, 94, 0.16);
  --hc-line2: rgba(255, 255, 255, 0.07);
  --hc-gold: #d6b25e;
  --hc-gold-hi: #f0d68f;
  --hc-gold-ink: #1b1406;
  --hc-ivory: #f3ebdd;
  --hc-muted: #97a39d;
  --hc-dim: #6c7872;
  --hc-tie: #7cb0e2;
  --hc-lose: #c98a82;
  --hc-card: #fbf6ea;
  --hc-card-edge: #e3d7bf;
  --hc-red: #b92d37;
  --hc-black: #17202c;
  --hc-felt: #0e3527;
  --hc-radius: 18px;

  container-type: inline-size;
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: radial-gradient(120% 60% at 50% -10%, #11261e 0%, var(--hc-bg) 60%);
  color: var(--hc-ivory);
  font-family: "Pretendard Variable", Pretendard, "Noto Sans KR", -apple-system, system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
/* 초기화는 **우선순위 0(:where)** 으로만 건다. `.hc button` 으로 두면 (0,1,1) 이 `.hc-pill`(0,1,0) 을 이겨
   알약·차트 칸·빈 카드 칸의 배경·테두리·글자색이 조용히 다 지워진다(2026-09-14 폰 그림에서 잡았다 — 검사는 전부 통과했다). */
:where(.hc) *, :where(.hc) *::before, :where(.hc) *::after { box-sizing: border-box; }
:where(.hc) :where(button, input) { font: inherit; color: inherit; }
:where(.hc) button { border: 0; background: none; cursor: pointer; padding: 0; }
:where(.hc) svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.hc :focus-visible { outline: 2px solid var(--hc-gold-hi); outline-offset: 2px; }
.hc [aria-disabled="true"] { cursor: not-allowed; }
.hc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hc-muted { color: var(--hc-muted); }

/* ── 머리 ── */
.hc-head {
  flex: none;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 6px 10px 14px;
  padding-top: max(10px, env(safe-area-inset-top));
  border-bottom: 1px solid var(--hc-line2);
  background: rgba(7, 17, 13, 0.92);
}
.hc--page .hc-head { padding-top: max(12px, env(safe-area-inset-top)); }
.hc-logo {
  flex: none; width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #e9cd84, #a9822f);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 4px 12px rgba(0, 0, 0, 0.35);
}
.hc-logo svg { width: 22px; height: 22px; fill: #10170f; stroke: none; }
.hc-titles { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hc-eyebrow { font-size: 10.5px; letter-spacing: 2.2px; font-weight: 600; color: var(--hc-gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hc-title { margin: 1px 0 0; font-size: 18px; font-weight: 800; letter-spacing: -0.4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--hc-ivory); }
.hc-head-btns { flex: none; display: flex; }
.hc-ibtn {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; color: var(--hc-gold);
  position: relative;
}
.hc-ibtn::before { content: ''; position: absolute; inset: 5px; border-radius: 50%; border: 1px solid var(--hc-line); transition: background 0.15s; }
.hc-ibtn:hover::before { background: rgba(214, 178, 94, 0.08); }
.hc-ibtn svg { position: relative; }
.hc-ibtn--x { color: var(--hc-muted); }
.hc-ibtn--sm { width: 40px; height: 40px; }
.hc-ibtn--sm::before { inset: 4px; }
.hc-ibtn[disabled] { opacity: 0.35; cursor: not-allowed; }
@container (max-width: 380px) {
  .hc-head { gap: 8px; padding-left: 10px; }
  .hc-logo { width: 34px; height: 34px; }
  .hc-title { font-size: 16px; }
  .hc-eyebrow { font-size: 9.5px; letter-spacing: 1.6px; }
  .hc-ibtn { width: 42px; }
}

/* ── 몸통 ── */
.hc-scroll {
  flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden;
  overscroll-behavior: contain;
  padding: 12px 12px 20px;
  /* 굴리는 것은 되고 막대만 안 보인다 — app.css 의 「막대를 화면 전체에서 없앤다」와 같은 판단(2026-09-15 지시) */
  scrollbar-width: none; -ms-overflow-style: none;
}
.hc-scroll::-webkit-scrollbar { width: 0; height: 0; display: none; }
.hc-modebar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.hc-badge { font-size: 11.5px; font-weight: 600; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--hc-line); color: var(--hc-muted); }
.hc-badge.is-exact { color: var(--hc-gold-hi); border-color: rgba(214, 178, 94, 0.45); background: rgba(214, 178, 94, 0.08); }
.hc-badge.is-mc { color: var(--hc-tie); border-color: rgba(124, 176, 226, 0.4); background: rgba(124, 176, 226, 0.07); }

/* 세그먼트 */
.hc-seg { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--hc-line2); }
.hc-seg button { min-height: 36px; padding: 0 14px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--hc-muted); white-space: nowrap; }
.hc-seg button[aria-pressed="true"] { background: var(--hc-gold); color: var(--hc-gold-ink); }
.hc-seg--sm button { min-height: 32px; padding: 0 10px; font-size: 12px; }
.hc-seg--xs button { min-height: 30px; padding: 0 9px; font-size: 11.5px; }
.hc-seg--wide { display: flex; width: 100%; flex-wrap: wrap; border-radius: 14px; }
.hc-seg--wide button { flex: 1 1 0; min-height: 44px; border-radius: 11px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; line-height: 1.15; }
.hc-seg--wide button small { font-size: 10.5px; opacity: 0.8; font-weight: 500; }

.hc-sec { margin: 0 0 14px; }
.hc-sec-head { display: flex; align-items: center; gap: 8px; margin: 2px 2px 8px; }
.hc-sec-head h3 { margin: 0; flex: 1; font-size: 13px; font-weight: 700; letter-spacing: 0.4px; color: var(--hc-gold); display: flex; align-items: center; gap: 4px; }
.hc-q {
  width: 22px; height: 22px; border-radius: 50%; font-size: 12px; font-weight: 700;
  color: var(--hc-muted); border: 1px solid var(--hc-line2); display: inline-grid; place-items: center; position: relative;
}
.hc-q::after { content: ''; position: absolute; inset: -11px; } /* 누르는 자리는 44px */
.hc-foot { margin: 6px 2px 0; font-size: 11.5px; color: var(--hc-dim); line-height: 1.45; }
.hc-foot.is-error, .hc-alert.is-error { color: #f1a39b; }
.hc-alert { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; font-size: 13px; background: rgba(214, 178, 94, 0.08); border: 1px solid rgba(214, 178, 94, 0.3); color: var(--hc-ivory); }
.hc-alert.is-error { background: rgba(201, 138, 130, 0.1); border-color: rgba(201, 138, 130, 0.4); }

/* ═════════════ 카드 ═════════════ */
.hc-card {
  --w: 58px;
  position: relative; flex: none;
  width: var(--w); height: calc(var(--w) * 1.4);
  border-radius: calc(var(--w) * 0.13);
  background: linear-gradient(160deg, #fffdf6, var(--hc-card) 55%, #f1e8d6);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 0 0 1px var(--hc-card-edge), 0 6px 14px rgba(0, 0, 0, 0.35);
  color: var(--hc-black);
  display: block; overflow: hidden;
  font-family: "Pretendard Variable", Pretendard, system-ui, sans-serif;
}
.hc-card::after { content: ''; position: absolute; inset: calc(var(--w) * 0.06); border-radius: calc(var(--w) * 0.08); border: 1px solid rgba(214, 178, 94, 0.35); pointer-events: none; }
.hc-card.is-red { color: var(--hc-red); }
.hc-card-idx { position: absolute; left: calc(var(--w) * 0.12); top: calc(var(--w) * 0.08); display: flex; flex-direction: column; align-items: center; line-height: 0.95; }
.hc-card-idx b { font-size: calc(var(--w) * 0.36); font-weight: 800; letter-spacing: -0.04em; }
.hc-card-idx i { font-style: normal; font-size: calc(var(--w) * 0.24); margin-top: 1px; }
.hc-card-pip { position: absolute; right: calc(var(--w) * 0.1); bottom: calc(var(--w) * 0.06); font-size: calc(var(--w) * 0.62); line-height: 1; }
.hc-card--lg { --w: 62px; }
.hc-card--md { --w: 46px; }
.hc-card--sm { --w: 34px; }
.hc-card--xs { --w: 30px; }
.hc-card--xs .hc-card-pip, .hc-card--sm .hc-card-pip { font-size: calc(var(--w) * 0.5); }
@container (min-width: 520px) { .hc-card--lg { --w: 70px; } .hc-card--md { --w: 54px; } }
.hc-back {
  background:
    repeating-linear-gradient(45deg, rgba(214, 178, 94, 0.22) 0 1.5px, transparent 1.5px 9px),
    repeating-linear-gradient(-45deg, rgba(214, 178, 94, 0.22) 0 1.5px, transparent 1.5px 9px),
    linear-gradient(160deg, #164233, #0b241b);
  box-shadow: 0 0 0 1px rgba(214, 178, 94, 0.45), 0 6px 14px rgba(0, 0, 0, 0.35);
}
.hc-back::after { border-color: rgba(214, 178, 94, 0.55); }
.hc-back i { position: absolute; left: 50%; top: 50%; width: 42%; aspect-ratio: 1; transform: translate(-50%, -50%) rotate(45deg); border: 1.5px solid var(--hc-gold); background: #0d2b20; }
.hc-card.is-pop { animation: hcPop 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.25); }
@keyframes hcPop { from { transform: translateY(6px) scale(0.86); opacity: 0.2; } to { transform: none; opacity: 1; } }

/* 빈 칸 */
.hc-slot, .hc-bslot {
  flex: none; display: grid; place-items: center; align-content: center;
  width: 62px; height: 87px; border-radius: 9px;
  border: 1.5px dashed rgba(214, 178, 94, 0.5); color: var(--hc-gold);
  background: rgba(214, 178, 94, 0.04);
  transition: background 0.15s, transform 0.12s;
}
.hc-slot small { font-size: 10px; color: var(--hc-muted); margin-top: 2px; }
.hc-slot:hover, .hc-bslot:hover { background: rgba(214, 178, 94, 0.1); }
.hc-slot:active, .hc-bslot:active { transform: scale(0.97); }
.hc-slot.has-card, .hc-bslot.has-card { border: 0; background: none; width: auto; height: auto; }
.hc-slot--sm { width: 34px; height: 48px; border-radius: 6px; }
.hc-slot--sm svg { width: 16px; height: 16px; }
@container (min-width: 520px) { .hc-slot { width: 70px; height: 98px; } }

/* ═════════════ 요약 ═════════════ */
.hc-sum { padding: 12px; border-radius: var(--hc-radius); background: linear-gradient(180deg, var(--hc-panel2), var(--hc-panel)); border: 1px solid var(--hc-line); }
.hc-sum .hc-sec-head { margin: 0 0 8px; }
.hc-srows { display: flex; flex-direction: column; gap: 8px; }
.hc-srow {
  display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "rank name val" "bar bar bar" "sub sub sub" "sub2 sub2 sub2";
  column-gap: 8px; row-gap: 4px; align-items: center;
  padding: 8px 10px; border-radius: 12px; background: rgba(0, 0, 0, 0.18);
}
.hc-srank { grid-area: rank; display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 700; color: var(--hc-muted); min-width: 34px; white-space: nowrap; }
.hc-srank svg { width: 14px; height: 14px; fill: currentColor; stroke: none; }
.hc-sname { grid-area: name; min-width: 0; display: flex; align-items: baseline; gap: 6px; }
.hc-sname b { font-size: 13.5px; font-weight: 700; white-space: nowrap; }
.hc-sname small { font-size: 12px; color: var(--hc-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hc-sval { grid-area: val; font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
.hc-sbar { grid-area: bar; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.hc-sbar i { display: block; height: 100%; border-radius: inherit; background: #7d8983; transition: width 0.5s ease; }
.hc-ssub { grid-area: sub; font-size: 11.5px; color: var(--hc-muted); font-variant-numeric: tabular-nums; }
.hc-ssub2 { grid-area: sub2; font-size: 11.5px; color: var(--hc-dim); }
.hc-srow.tier-1 { background: rgba(214, 178, 94, 0.09); box-shadow: inset 0 0 0 1px rgba(214, 178, 94, 0.35); }
.hc-srow.tier-1 .hc-srank, .hc-srow.tier-1 .hc-sval { color: var(--hc-gold-hi); }
.hc-srow.tier-1 .hc-sbar i { background: linear-gradient(90deg, #b58b35, var(--hc-gold-hi)); }
.hc-srow.tier-2 .hc-srank, .hc-srow.tier-2 .hc-sval { color: var(--hc-tie); }
.hc-srow.tier-2 .hc-sbar i { background: var(--hc-tie); }
.hc-sec.is-new, .hc-player.is-new .hc-result { animation: hcIn 0.35s ease; }
@keyframes hcIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ═════════════ 플레이어 ═════════════ */
.hc-player {
  position: relative;
  margin: 0 0 12px; padding: 12px;
  border-radius: var(--hc-radius);
  background: linear-gradient(180deg, var(--hc-panel2), var(--hc-panel));
  border: 1px solid var(--hc-line2);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
}
.hc-player.is-me { border-color: var(--hc-line); }
.hc-player.rank-1 { border-color: rgba(214, 178, 94, 0.55); box-shadow: 0 0 0 1px rgba(214, 178, 94, 0.2), 0 10px 26px rgba(0, 0, 0, 0.3); }
.hc-player.rank-1::before { content: ''; position: absolute; left: 0; top: 16px; bottom: 16px; width: 3px; border-radius: 0 3px 3px 0; background: var(--hc-gold); }
.hc-ptop { display: flex; align-items: center; gap: 14px; }
.hc-hole { display: flex; gap: 8px; flex: none; }
.hc-pmain { flex: 1; min-width: 0; }
.hc-plabel { font-size: 12px; letter-spacing: 1.5px; color: var(--hc-gold); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hc-pwin { display: flex; align-items: baseline; gap: 6px; font-size: 34px; font-weight: 800; letter-spacing: -1px; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--hc-ivory); }
.hc-pwin small { font-size: 11.5px; font-weight: 600; letter-spacing: 0; color: var(--hc-muted); }
.hc-player.rank-1 .hc-pwin { color: var(--hc-gold-hi); }
.hc-player.rank-2 .hc-pwin { color: #cfe3f7; }
.hc-pstats { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; margin-top: 2px; }
.hc-pstats .is-tie { color: var(--hc-tie); }
.hc-pstats .is-lose { color: var(--hc-lose); }
.hc-pstats .is-eq { color: var(--hc-ivory); }
.hc-ci { font-size: 11px; color: var(--hc-dim); margin-top: 2px; }
.hc-pwait { font-size: 17px; font-weight: 600; color: var(--hc-muted); margin-top: 4px; }
.hc-pwait.is-run { color: var(--hc-gold); }
@container (max-width: 360px) {
  .hc-ptop { gap: 10px; }
  .hc-pwin { font-size: 28px; }
  .hc-hole { gap: 6px; }
}
@container (min-width: 520px) { .hc-pwin { font-size: 40px; } }

.hc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.hc-chip {
  display: inline-flex; align-items: center; gap: 4px; min-height: 30px;
  padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  color: var(--hc-ivory); background: rgba(255, 255, 255, 0.05); border: 1px solid var(--hc-line2);
}
.hc-chip svg { width: 14px; height: 14px; }
.hc-chip.is-hand { color: var(--hc-gold-hi); border-color: rgba(214, 178, 94, 0.45); background: rgba(214, 178, 94, 0.08); }
button.hc-chip { min-height: 36px; }
button.hc-chip:hover { border-color: rgba(214, 178, 94, 0.45); }
.hc-chip.is-chart b { color: var(--hc-gold-hi); }

/* 상대 머리 */
.hc-ohead { display: flex; align-items: center; gap: 6px; margin: -2px 0 10px; }
.hc-name { flex: 1; min-width: 0; display: inline-flex; align-items: center; gap: 4px; min-height: 40px; font-size: 14px; font-weight: 700; color: var(--hc-ivory); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hc-name svg { width: 14px; height: 14px; color: var(--hc-muted); }
.hc-name-in { flex: 1; min-width: 0; height: 40px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--hc-gold); background: rgba(0, 0, 0, 0.3); font-size: 16px; }
@container (max-width: 380px) {
  .hc-ohead { flex-wrap: wrap; }
  .hc-ohead .hc-name { flex: 1 1 100%; order: 0; }
  .hc-ohead .hc-seg { order: 1; }
  .hc-ohead .hc-ibtn { order: 2; margin-left: auto; }
}

/* ── 족보 확률 ── */
.hc-result { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--hc-line2); }
.hc-settled { margin: 0 0 10px; padding: 8px 10px; border-radius: 10px; font-size: 12px; line-height: 1.5; color: var(--hc-ivory); background: rgba(214, 178, 94, 0.07); border: 1px solid rgba(214, 178, 94, 0.25); }
.hc-cats-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.hc-cats-head h4, .hc-street h4, .hc-best h4, .hc-outs h4, .hc-detail h4 { margin: 0; flex: 1; font-size: 12.5px; font-weight: 700; color: var(--hc-muted); letter-spacing: 0.3px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.hc-cgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
.hc-cat { display: grid; grid-template-columns: 1fr auto; align-items: baseline; column-gap: 6px; padding: 4px 6px 5px; border-radius: 8px; min-width: 0; }
.hc-cname { font-size: 12.5px; color: var(--hc-ivory); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hc-cval { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--hc-ivory); }
.hc-cbar { grid-column: 1 / -1; height: 3px; margin-top: 4px; border-radius: 99px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.hc-cbar i { display: block; height: 100%; background: #6f7c75; border-radius: inherit; }
.hc-cat.is-zero .hc-cname, .hc-cat.is-zero .hc-cval { color: var(--hc-dim); }
.hc-cat.top-1 { background: rgba(214, 178, 94, 0.12); box-shadow: inset 0 0 0 1px rgba(214, 178, 94, 0.4); }
.hc-cat.top-1 .hc-cname, .hc-cat.top-1 .hc-cval { color: var(--hc-gold-hi); }
.hc-cat.top-1 .hc-cbar i { background: var(--hc-gold); }
.hc-cat.top-2, .hc-cat.top-3 { background: rgba(214, 178, 94, 0.05); }
.hc-cat.top-2 .hc-cbar i, .hc-cat.top-3 .hc-cbar i { background: rgba(214, 178, 94, 0.55); }
.hc-star { font-style: normal; margin-right: 3px; color: var(--hc-gold); font-size: 11px; }
@container (max-width: 350px) { .hc-cgrid { column-gap: 6px; } .hc-cname { font-size: 11.5px; } .hc-cval { font-size: 12px; } }
.hc-likely { margin: 10px 2px 0; font-size: 12.5px; color: var(--hc-muted); display: flex; flex-wrap: wrap; gap: 2px 8px; }
.hc-likely b { color: var(--hc-gold-hi); }
.hc-likely span { flex-basis: 100%; font-size: 11.5px; color: var(--hc-dim); }

.hc-street, .hc-best, .hc-outs, .hc-detail { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: rgba(0, 0, 0, 0.2); }
.hc-street h4 span, .hc-best h4 span { color: var(--hc-ivory); font-weight: 600; }
.hc-street > div, .hc-detail > div { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; padding: 5px 0; border-bottom: 1px solid var(--hc-line2); }
.hc-street > div:last-child, .hc-detail > div:last-of-type { border-bottom: 0; }
.hc-street span, .hc-detail span { color: var(--hc-muted); }
.hc-street b, .hc-detail b { font-variant-numeric: tabular-nums; text-align: right; }
.hc-best-cards { display: flex; align-items: center; gap: 5px; margin-top: 8px; flex-wrap: wrap; }
.hc-best-sep { width: 1px; height: 30px; margin: 0 4px; background: var(--hc-line2); }
.hc-card.is-core { box-shadow: 0 0 0 2px var(--hc-gold), 0 4px 10px rgba(0, 0, 0, 0.35); }
.hc-card.is-kick { opacity: 0.85; }
.hc-card.is-unused { opacity: 0.35; filter: saturate(0.4); }
.hc-best-legend { display: flex; gap: 10px; margin: 8px 0 0; font-size: 11px; color: var(--hc-dim); }
.hc-best-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.hc-best-legend .k1 { box-shadow: 0 0 0 2px var(--hc-gold); background: var(--hc-card); }
.hc-best-legend .k2 { background: var(--hc-card); opacity: 0.85; }
.hc-best-legend .k3 { background: var(--hc-card); opacity: 0.35; }
.hc-why-line { margin: 8px 0 0; font-size: 12.5px; color: var(--hc-gold-hi); }

.hc-tag { font-size: 10.5px; padding: 1px 6px; border-radius: 99px; background: rgba(124, 176, 226, 0.14); color: var(--hc-tie); font-weight: 700; }
.hc-outs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.hc-outs-grid > div { padding: 8px; border-radius: 10px; background: rgba(255, 255, 255, 0.03); display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.hc-outs-grid span { font-size: 11.5px; color: var(--hc-muted); }
.hc-outs-grid b { font-size: 18px; font-weight: 800; }
.hc-outs-grid small { font-size: 11px; color: var(--hc-dim); line-height: 1.35; }
.hc-draws { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.hc-outlist { margin-top: 8px; font-size: 12px; }
.hc-outlist summary { cursor: pointer; color: var(--hc-gold); min-height: 36px; display: flex; align-items: center; }
.hc-outlist p { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin: 6px 0; }
.hc-outlist p b { width: 58px; flex: none; color: var(--hc-muted); font-weight: 600; }
.hc-mini { padding: 1px 5px; border-radius: 5px; background: var(--hc-card); color: var(--hc-black); font-weight: 700; font-size: 11.5px; }
.hc-mini.is-red { color: var(--hc-red); }

.hc-whybtn { margin-top: 10px; width: 100%; min-height: 44px; border-radius: 12px; border: 1px solid var(--hc-line); color: var(--hc-gold); font-size: 13px; font-weight: 600; }
.hc-whybtn:hover { background: rgba(214, 178, 94, 0.06); }
.hc-explain { margin-top: 8px; padding: 10px 12px; border-radius: 12px; background: rgba(0, 0, 0, 0.22); font-size: 13px; line-height: 1.55; }
.hc-explain h5 { margin: 8px 0 2px; font-size: 12px; color: var(--hc-gold); }
.hc-explain h5:first-child { margin-top: 0; }
.hc-explain p { margin: 0 0 3px; color: var(--hc-ivory); }

/* ═════════════ 보드 ═════════════ */
.hc-felt {
  position: relative; padding: 16px 14px 10px;
  border-radius: 56px;
  background: radial-gradient(100% 120% at 50% 0%, #17503a 0%, var(--hc-felt) 55%, #0a271d 100%);
  box-shadow: inset 0 0 0 2px rgba(214, 178, 94, 0.4), inset 0 0 28px rgba(0, 0, 0, 0.35), 0 10px 24px rgba(0, 0, 0, 0.35);
}
.hc-bslots { display: flex; justify-content: center; align-items: flex-start; gap: 10px; }
.hc-bgroup { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.hc-bgroup > div { display: flex; gap: 6px; }
.hc-bgroup > span { font-size: 9.5px; letter-spacing: 2px; color: rgba(214, 178, 94, 0.6); }
.hc-bslot { width: 46px; height: 64px; border-radius: 7px; }
.hc-bslot.is-later { border-color: rgba(214, 178, 94, 0.28); color: rgba(214, 178, 94, 0.6); }
@container (min-width: 520px) { .hc-bslot { width: 54px; height: 76px; } .hc-bslots { gap: 14px; } }
@container (max-width: 350px) { .hc-bslots { gap: 6px; } .hc-bgroup > div { gap: 4px; } .hc-bslot { width: 42px; height: 59px; } .hc-bslot .hc-card--md { --w: 42px; } }
.hc-street-name { text-align: center; font-size: 11px; color: var(--hc-muted); margin-top: 2px; }
.hc-bact { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 10px; }
.hc-pill {
  display: inline-flex; align-items: center; gap: 5px; min-height: 36px; padding: 0 12px;
  border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--hc-ivory);
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--hc-line2); cursor: pointer; white-space: nowrap;
}
.hc-pill svg { width: 15px; height: 15px; color: var(--hc-gold); }
.hc-pill:hover { border-color: rgba(214, 178, 94, 0.45); }
.hc-pill.is-gold { background: rgba(214, 178, 94, 0.14); border-color: rgba(214, 178, 94, 0.5); color: var(--hc-gold-hi); }
.hc-pill[aria-pressed="true"] { background: var(--hc-gold); color: var(--hc-gold-ink); border-color: var(--hc-gold); }
.hc-pill[aria-pressed="true"] svg { color: inherit; }

.hc-add {
  width: 100%; min-height: 52px; border-radius: var(--hc-radius);
  border: 1.5px dashed rgba(214, 178, 94, 0.45); color: var(--hc-gold);
  display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 14px; font-weight: 600;
}
.hc-add small { color: var(--hc-dim); font-weight: 500; }
.hc-add:hover { background: rgba(214, 178, 94, 0.06); }

/* 고급 · 팟 오즈 */
.hc-adv, .hc-pot { padding: 12px; border-radius: var(--hc-radius); background: var(--hc-panel); border: 1px solid var(--hc-line2); }
.hc-field { margin-bottom: 14px; }
.hc-field:last-child { margin-bottom: 0; }
.hc-field-head { display: flex; flex-direction: column; margin-bottom: 8px; }
.hc-field-head b { font-size: 13px; }
.hc-field-head span { font-size: 11.5px; color: var(--hc-dim); }
.hc-deadrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.hc-fold { width: 100%; min-height: 44px; display: flex; justify-content: space-between; align-items: center; font-size: 14px; font-weight: 700; color: var(--hc-ivory); }
.hc-fold span { font-size: 12px; color: var(--hc-gold); font-weight: 600; }
.hc-potin { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 6px 0 10px; }
.hc-potin label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--hc-muted); min-width: 0; }
/* 이름 줄은 **한 줄**이다 — 「상대 베팅 전」을 이름 밑에 두면 그 칸만 키가 커져 입력칸 셋의 높이가 어긋났다(2026-09-15 지시). */
.hc-potlab { display: flex; align-items: baseline; gap: 4px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3; }
.hc-potin small { font-size: 10px; color: var(--hc-dim); flex: none; }
.hc-potin input, .hc-unit-in input { height: 44px; width: 100%; padding: 0 10px; border-radius: 10px; border: 1px solid var(--hc-line2); background: rgba(0, 0, 0, 0.3); font-size: 16px; font-variant-numeric: tabular-nums; }
.hc-potin input:focus, .hc-unit-in input:focus { border-color: var(--hc-gold); outline: none; }
@container (max-width: 360px) { .hc-potin { grid-template-columns: 1fr 1fr; } }
.hc-potres > div { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--hc-line2); font-size: 13px; }
.hc-potres span { color: var(--hc-muted); }
.hc-potres .is-call b { color: var(--hc-gold-hi); }
.hc-potres .is-fold b { color: var(--hc-lose); }
.hc-unit-in { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 12.5px; color: var(--hc-muted); }
.hc-unit-in input { flex: 1; }

.hc-info { margin-top: 4px; }
.hc-disclaimer { margin: 10px 2px 0; font-size: 11.5px; line-height: 1.5; color: var(--hc-dim); }
.hc-adslot[hidden] { display: none !important; }

/* ═════════════ 아래 고정 ═════════════ */
.hc-actions {
  flex: none; padding: 8px 12px 10px;
  padding-bottom: max(10px, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(7, 17, 13, 0.6), rgba(7, 17, 13, 0.98) 30%);
  border-top: 1px solid var(--hc-line2);
}
.hc-act-row { display: flex; gap: 8px; }
.hc-errline, .hc-progress-line { font-size: 12px; color: var(--hc-lose); margin: 0 2px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hc-progress-line { color: var(--hc-muted); font-variant-numeric: tabular-nums; }
.hc-btn {
  position: relative; min-height: 52px; padding: 0 16px; border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 16px; font-weight: 700; text-decoration: none; cursor: pointer; overflow: hidden;
}
.hc-btn svg { width: 18px; height: 18px; }
.hc-btn--ghost { flex: 0 0 auto; min-width: 96px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--hc-line2); color: var(--hc-ivory); }
.hc-btn--go { flex: 1; background: linear-gradient(180deg, #e6c574, #c29a42); color: var(--hc-gold-ink); box-shadow: 0 6px 18px rgba(194, 154, 66, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.4); }
.hc-btn--go[aria-disabled="true"] { background: rgba(255, 255, 255, 0.06); color: var(--hc-dim); box-shadow: none; }
.hc-btn--go.is-done { background: linear-gradient(180deg, #2a4a3d, #1d3a2e); color: var(--hc-gold-hi); box-shadow: inset 0 0 0 1px rgba(214, 178, 94, 0.5); }
.hc-btn--danger { flex: 1; background: #8d3a34; color: #fff; }
.hc-btn--run { flex: 1; background: rgba(255, 255, 255, 0.06); color: var(--hc-gold-hi); border: 1px solid var(--hc-line); cursor: default; }
.hc-btn--run i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, rgba(214, 178, 94, 0.18), rgba(214, 178, 94, 0.32)); transition: width 0.2s linear; }
.hc-btn--run span { position: relative; font-variant-numeric: tabular-nums; }
.hc-btn--ghost:hover { border-color: rgba(214, 178, 94, 0.45); }
.hc-actions .hc-btn--ghost { flex: 0 0 34%; }

/* ═════════════ 겹창 ═════════════ */
.hc-layer { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.hc-layer > * { pointer-events: auto; }
.hc-scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.55); animation: hcFade 0.2s ease; }
.hc-scrim.is-under { background: transparent; animation: none; }
@keyframes hcFade { from { opacity: 0; } }
.hc-sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  max-height: 92%; display: flex; flex-direction: column;
  border-radius: 22px 22px 0 0;
  background: linear-gradient(180deg, #16211d, #0f1815);
  border-top: 1px solid rgba(214, 178, 94, 0.35);
  box-shadow: 0 -16px 40px rgba(0, 0, 0, 0.5);
  padding-bottom: env(safe-area-inset-bottom);
}
.hc-sheet.is-fresh { animation: hcUp 0.26s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes hcUp { from { transform: translateY(40%); opacity: 0.4; } }
.hc-modal {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(440px, calc(100% - 24px)); max-height: calc(100% - 40px);
  display: flex; flex-direction: column; border-radius: 20px;
  background: #121c18; border: 1px solid rgba(214, 178, 94, 0.3); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  animation: hcFade 0.18s ease;
}
.hc-grab { width: 44px; height: 4px; border-radius: 99px; background: rgba(214, 178, 94, 0.45); margin: 8px auto 2px; flex: none; }
.hc-lhead { flex: none; display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 16px; }
.hc-lt { flex: 1; min-width: 0; }
.hc-lt small { display: block; font-size: 12px; color: var(--hc-muted); }
.hc-lt h3 { margin: 0; font-size: 19px; font-weight: 800; color: var(--hc-ivory); }
.hc-backbtn { display: inline-flex; align-items: center; gap: 2px; min-height: 40px; padding: 0 10px 0 6px; border-radius: 12px; border: 1px solid var(--hc-line); color: var(--hc-gold); font-weight: 600; margin-right: 4px; }
.hc-backbtn svg { width: 18px; height: 18px; }
.hc-lbody { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 16px 16px; }
.hc-lfoot { flex: none; display: flex; gap: 8px; padding: 10px 16px 14px; border-top: 1px solid var(--hc-line2); }
.hc-lfoot .hc-btn--ghost { flex: 0 0 34%; }

.hc-pk-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.hc-pk-tools .hc-seg { margin-left: auto; }
.hc-ranks { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; }
.hc-rank {
  min-height: 52px; border-radius: 12px; font-size: 22px; font-weight: 800;
  background: linear-gradient(180deg, #1c2622, #141c19); border: 1px solid var(--hc-line2); color: var(--hc-ivory);
  font-family: "Pretendard Variable", Pretendard, system-ui, sans-serif;
}
.hc-rank.is-face { color: var(--hc-gold-hi); border-color: rgba(214, 178, 94, 0.3); }
.hc-rank:hover { border-color: var(--hc-gold); }
.hc-rank[aria-disabled="true"] { opacity: 0.3; }
.hc-suits { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.hc-suitbtn { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 4px; border-radius: 14px; border: 1px solid transparent; }
.hc-suitbtn .hc-card { --w: min(68px, 17cqi); }
.hc-suitbtn small { font-size: 11px; color: var(--hc-muted); text-align: center; }
.hc-suitbtn:hover { border-color: var(--hc-line); }
.hc-suitbtn.is-sel .hc-card { box-shadow: 0 0 0 3px var(--hc-gold), 0 6px 14px rgba(0, 0, 0, 0.35); }
.hc-suitbtn.is-used .hc-card { opacity: 0.3; }
.hc-suitbtn.is-used small { color: var(--hc-lose); }
.hc-grid52 { display: flex; flex-direction: column; gap: 5px; }
.hc-g52row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.hc-g52 {
  position: relative; min-height: 44px; border-radius: 9px;
  background: var(--hc-card); color: var(--hc-black);
  display: flex; align-items: center; justify-content: center; gap: 3px; font-weight: 800; font-size: 16px;
}
.hc-g52 i { font-style: normal; font-size: 15px; }
.hc-g52.is-red { color: var(--hc-red); }
.hc-g52.is-used { opacity: 0.28; }
.hc-g52 small { position: absolute; bottom: 1px; left: 0; right: 0; font-size: 8.5px; font-weight: 600; color: #333; text-align: center; white-space: nowrap; overflow: hidden; }
.hc-g52.is-sel { box-shadow: 0 0 0 3px var(--hc-gold); }
@container (min-width: 560px) {
  .hc-grid52 { display: grid; grid-template-columns: repeat(13, 1fr); grid-auto-flow: column; grid-template-rows: repeat(4, auto); }
  .hc-g52row { display: contents; }
}

/* 13×13 차트 */
.hc-matrix { display: flex; flex-direction: column; gap: 2px; margin: 4px 0; user-select: none; -webkit-user-select: none; }
[data-range-matrix] .hc-matrix { touch-action: none; }
.hc-mrow { display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); gap: 2px; }
.hc-cell {
  aspect-ratio: 1; min-width: 0; border-radius: 4px;
  font-size: clamp(7.5px, 2.35cqi, 12px); font-weight: 700; letter-spacing: -0.6px;
  display: grid; place-items: center; overflow: hidden; white-space: nowrap;
  background: #1a2420; color: var(--hc-dim); border: 1px solid transparent;
}
.hc-cell.tier-t1 { background: #3b3113; color: #f3d98f; border-color: rgba(214, 178, 94, 0.55); }
.hc-cell.tier-t2 { background: #14304a; color: #a9d2f5; border-color: rgba(124, 176, 226, 0.45); }
.hc-cell.tier-t3 { background: #2b3230; color: #d5ddd9; }
.hc-cell.tier-t4 { background: #1a211e; color: #75807b; }
.hc-cell.is-pair { font-weight: 800; }
.hc-cell.is-me { box-shadow: inset 0 0 0 2px var(--hc-gold-hi); color: #fff; }
.hc-cell.is-focus { outline: 2px solid #fff; outline-offset: -2px; }
[data-range-matrix] .hc-cell { cursor: pointer; }
[data-range-matrix] .hc-cell.is-pair { background: #1e2a26; }
[data-range-matrix] .hc-cell.is-on { background: linear-gradient(180deg, #e2c16f, #c29a42); color: var(--hc-gold-ink); }
[data-range-matrix] .hc-cell.is-dead { text-decoration: line-through; opacity: 0.45; }
.hc-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 10px 0 4px; font-size: 12px; color: var(--hc-muted); }
.hc-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
.hc-legend .t1 { background: #d6b25e; } .hc-legend .t2 { background: #7cb0e2; } .hc-legend .t3 { background: #c5cdc9; } .hc-legend .t4 { background: #5d6863; }
.hc-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.hc-rg-focus { min-height: 36px; margin: 6px 0; font-size: 12.5px; color: var(--hc-ivory); }
.hc-rg-focus b { color: var(--hc-gold-hi); }
.hc-rg-sum { margin: 0; font-size: 13px; color: var(--hc-muted); }
.hc-rg-sum b { color: var(--hc-ivory); }

/* 설정 · 도움말 */
.hc-help details { border-bottom: 1px solid var(--hc-line2); }
.hc-help summary { min-height: 48px; display: flex; align-items: center; cursor: pointer; font-weight: 700; color: var(--hc-ivory); list-style: none; }
.hc-help summary::after { content: '+'; margin-left: auto; color: var(--hc-gold); font-size: 18px; }
.hc-help details[open] summary::after { content: '−'; }
.hc-help summary::-webkit-details-marker { display: none; }
.hc-help p { margin: 0 0 10px; font-size: 13px; line-height: 1.6; color: #d8d2c6; }

/* 카메라 */
.hc-beta { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; font-size: 12.5px; line-height: 1.5; background: rgba(124, 176, 226, 0.08); border: 1px solid rgba(124, 176, 226, 0.3); }
.hc-cam-empty { display: flex; flex-direction: column; gap: 10px; }
.hc-cam-empty .hc-btn { width: 100%; }
.hc-photo { position: relative; border-radius: 14px; overflow: hidden; background: #000; aspect-ratio: 4 / 3; cursor: crosshair; }
.hc-photo-in { position: absolute; inset: 0; display: grid; place-items: center; transform: rotate(var(--rot)); transition: transform 0.2s; pointer-events: none; }
.hc-photo-in img { max-width: 100%; max-height: 100%; object-fit: contain; }
.hc-mark { position: absolute; transform: translate(-50%, -50%); padding: 2px 7px; border-radius: 99px; background: var(--hc-gold); color: var(--hc-gold-ink); font-size: 12px; font-weight: 800; white-space: nowrap; pointer-events: none; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5); }
.hc-cam-tools { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 14px; }

/* 공유 */
.hc-share img { width: 100%; border-radius: 12px; border: 1px solid var(--hc-line2); margin-bottom: 10px; }
.hc-share .hc-act-row { flex-wrap: wrap; }
.hc-share .hc-btn { flex: 1 1 120px; font-size: 14px; min-height: 46px; }

.hc-toast {
  position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%);
  max-width: calc(100% - 32px); padding: 10px 16px; border-radius: 12px;
  background: #f3ebdd; color: #14100a; font-size: 13.5px; font-weight: 600; text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45); z-index: 10; pointer-events: none;
  animation: hcFade 0.18s ease;
}

@media (prefers-reduced-motion: reduce) {
  .hc *, .hc *::before, .hc *::after { animation: none !important; transition: none !important; }
}
