/* 카드 하이로우 */
.hc-setup { display: grid; gap: 24px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 860px) { .hc-setup { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.hc-rule p { margin-top: 0; }

.hc-play { position: relative; --cw: 66px; }
@media (max-width: 420px) { .hc-play { --cw: 56px; } }
.game-shell.is-full .hc-play { --cw: 78px; }

/* 카드 */
.hc-card { position: relative; width: var(--cw); height: calc(var(--cw) * 1.4); perspective: 700px; flex: none; }
.hc-inner {
  position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateY(180deg);
  transition: transform .5s cubic-bezier(.3, .9, .3, 1.1);
}
.hc-card.is-up .hc-inner { transform: rotateY(0deg); }
.hc-face {
  position: absolute; inset: 0; border-radius: calc(var(--cw) * .1); overflow: hidden;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.hc-front { background: #ffffff; color: #1d2030; border: 1px solid #d6d0c7; box-shadow: 0 2px 6px rgba(0, 0, 0, .16); }
.hc-card.is-red .hc-front { color: #d62839; }
.hc-back {
  transform: rotateY(180deg);
  background: repeating-linear-gradient(45deg, #ff5a36 0 5px, #ff7c5e 5px 10px);
  border: 3px solid #ffffff; box-shadow: 0 0 0 1px #d6d0c7, 0 2px 6px rgba(0, 0, 0, .18);
}
.hc-back::after {
  content: ""; position: absolute; inset: 4px; border: 1.5px solid rgba(255, 255, 255, .75); border-radius: 4px;
}
.hc-back::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 38%; height: 27%; transform: translate(-50%, -50%) rotate(45deg);
  background: rgba(255, 255, 255, .85); border-radius: 3px;
}
.hc-idx { position: absolute; display: flex; flex-direction: column; align-items: center; line-height: 1; }
.hc-idx b { font-size: calc(var(--cw) * .25); font-weight: 900; letter-spacing: -0.06em; font-family: var(--font-num); }
.hc-idx svg { width: calc(var(--cw) * .17); height: calc(var(--cw) * .17); margin-top: 1px; }
.hc-tl { top: calc(var(--cw) * .06); left: calc(var(--cw) * .07); }
.hc-br { bottom: calc(var(--cw) * .06); right: calc(var(--cw) * .07); transform: rotate(180deg); }
.hc-mid { position: absolute; inset: 0; display: grid; place-items: center; }
.hc-pip svg { display: block; width: calc(var(--cw) * .42); height: calc(var(--cw) * .42); }
.hc-pip.is-ace svg { width: calc(var(--cw) * .56); height: calc(var(--cw) * .56); }
.hc-court {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  width: 50%; height: 54%; border: 1.5px solid currentColor; border-radius: 4px;
  background: color-mix(in srgb, currentColor 7%, #ffffff);
}
.hc-court b { font-size: calc(var(--cw) * .34); font-weight: 900; line-height: 1; font-family: var(--font-num); }
.hc-court svg { width: calc(var(--cw) * .2); height: calc(var(--cw) * .2); }

/* 카드 더미 */
.hc-top { display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap; }
.hc-top-info { flex: 1 1 200px; min-width: 0; align-items: center; }
.hc-banner { font-size: 15px; }
.hc-banner-t { font-weight: 900; max-width: 7em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hc-deck {
  position: relative; flex: none; width: calc(var(--cw) + 10px); height: calc(var(--cw) * 1.4 + 30px);
  border: 0; background: transparent; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.hc-deck .hc-card { position: absolute; left: 0; top: 0; transition: transform .15s; }
.hc-deck .hc-stack-0 { transform: translate(7px, 7px); }
.hc-deck .hc-stack-1 { transform: translate(3.5px, 3.5px); }
.hc-deck:hover:not(:disabled) .hc-stack-2 { transform: translateY(-3px); }
.hc-deck:disabled { cursor: default; opacity: .45; }
.hc-deck:focus-visible { outline: 3px solid var(--primary); outline-offset: 4px; border-radius: 10px; }
.hc-deck-count {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  font-size: 12px; font-weight: 700; color: var(--text-3); white-space: nowrap;
}
.hc-deck-tap { animation: hc-tap .25s ease-out; }
@keyframes hc-tap { 0% { transform: scale(.94); } 100% { transform: scale(1); } }

/* 자리 */
.hc-slots { display: grid; gap: 10px 8px; grid-template-columns: repeat(auto-fill, minmax(calc(var(--cw) + 20px), 1fr)); }
.hc-slot {
  --c: var(--primary);
  display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0;
  padding: 8px 4px 6px; border-radius: 14px; border: 2px solid transparent; transition: border-color .2s, background .2s;
}
.hc-holder {
  width: var(--cw); height: calc(var(--cw) * 1.4); border-radius: calc(var(--cw) * .1);
  border: 2px dashed var(--border-strong); display: grid; place-items: center;
}
.hc-slot.has-card .hc-holder { border-color: transparent; }
.hc-slot-name { font-weight: 800; font-size: 13px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hc-slot-name::before {
  content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c);
  margin-right: 4px; vertical-align: 1px;
}
.hc-slot-tag { font-size: 12.5px; font-weight: 800; color: var(--text-2); min-height: 1.3em; font-family: var(--font-num); white-space: nowrap; }
.hc-slot.is-turn { border-color: var(--c); background: color-mix(in srgb, var(--c) 9%, transparent); }
.hc-slot.is-turn .hc-holder { border-color: var(--c); animation: bb-pulse 1s ease-in-out infinite; }
.hc-slot.is-lead .hc-slot-tag::before { content: "👑 "; }
.hc-play[data-mode="low"] .hc-slot.is-lead .hc-slot-tag::before { content: "🔻 "; }
.hc-slot.is-hit { border-color: var(--primary); background: var(--primary-soft); }
.hc-slot.is-hit .hc-card { animation: bb-bounce .7s ease-in-out infinite; }
.hc-flying {
  position: absolute; z-index: 5; pointer-events: none; transform-origin: 0 0;
  transition: transform .45s cubic-bezier(.3, .8, .3, 1); filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .25));
}
