.card-credit {
  font-size: 0.72rem;
  opacity: 0.7;
  margin-top: 0.3rem;
}

.card-credit a {
  color: inherit;
}

.game-main {
  max-width: 60rem;
  margin: 0 auto;
  padding: 0 1.25rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hud {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem 1.25rem;
  margin-bottom: 0.75rem;
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
}

.hud-item span {
  font-size: 1.1rem;
  color: var(--text);
  font-weight: 700;
}

.stage {
  position: relative;
  width: 100%;
  max-width: 560px;
  display: flex;
  justify-content: center;
}

.board {
  position: relative;
  width: 100%;
  min-height: 340px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: radial-gradient(ellipse at center, #145c40 0%, #0d3d2b 70%, #0a2e20 100%);
  padding: 0.9rem 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.opp-row,
.player-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.85);
}

.side-label {
  font-weight: 700;
  color: #fff;
}

.side-sub {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.72rem;
}

.floor-wrap {
  margin: 0.3rem 0;
}

.area-label {
  margin: 0 0 0.3rem;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  justify-content: space-between;
}

.stock-label {
  color: rgba(255, 255, 255, 0.5);
}

.card-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  min-height: 2.9rem;
}

.hand-row {
  padding-top: 0.3rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.15);
}

.turn-label {
  margin: 0.3rem 0 0;
  text-align: center;
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 700;
}

.hcard {
  width: clamp(1.7rem, 7vw, 2.3rem);
  aspect-ratio: 103.2 / 168.2;
  height: auto;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
  animation: card-deal 0.2s ease;
}

.hcard .card-art {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hcard-mini {
  width: clamp(1rem, 4.5vw, 1.35rem);
  aspect-ratio: 103.2 / 168.2;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.captured-row {
  min-height: 0;
  gap: 0.5rem;
  row-gap: 0.3rem;
}

.captured-group {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.15rem 0.3rem 0.15rem 0.1rem;
  background: rgba(0, 0, 0, 0.18);
  border-radius: 999px;
}

.captured-group-label {
  font-size: 0.66rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.8);
  white-space: nowrap;
  padding-left: 0.25rem;
}

.hcard.back {
  background: repeating-linear-gradient(
    135deg,
    var(--accent) 0px,
    var(--accent) 5px,
    #1a1330 5px,
    #1a1330 10px
  );
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hcard.clickable {
  cursor: pointer;
  transition: transform 0.12s ease;
}

.hcard.clickable:hover {
  transform: translateY(-4px);
}

.hcard.disabled {
  opacity: 0.55;
  pointer-events: none;
  cursor: not-allowed;
}

@keyframes card-deal {
  from {
    transform: translateY(-8px) scale(0.9);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.result-banner {
  align-self: center;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  font-weight: 700;
  font-size: 0.82rem;
  text-align: center;
}

.result-banner.hidden {
  display: none;
}

.result-banner.win {
  color: #7bffb0;
}

.result-banner.lose {
  color: #ff8a8a;
}

.result-banner.push {
  color: #ffe27a;
}

.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 12, 24, 0.94);
  backdrop-filter: blur(2px);
  border-radius: 14px;
  z-index: 5;
}

.overlay.hidden {
  display: none;
}

.overlay-panel {
  text-align: center;
  padding: 1.25rem;
  max-width: 320px;
}

.overlay-panel h2 {
  margin: 0 0 0.75rem;
}

.overlay-panel p {
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 1.25rem;
  font-size: 0.82rem;
}

.overlay-panel button {
  background: var(--accent);
  color: #1a1200;
  border: none;
  padding: 0.7rem 1.75rem;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.overlay-panel button:active {
  transform: scale(0.97);
}

.go-stop-buttons {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
}

.go-stop-buttons button {
  background: var(--panel);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.65rem 1.4rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}

#btn-go {
  background: var(--accent) !important;
  color: #1a1200 !important;
}

.controls {
  width: 100%;
  max-width: 560px;
  margin-top: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.bet-select,
.action-buttons {
  display: flex;
  gap: 0.4rem;
}

.bet-select button,
.action-buttons button {
  flex: 1;
  background: var(--panel);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.55rem 0.25rem;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.bet-select button.active {
  background: var(--accent);
  color: #1a1200;
  border-color: var(--accent);
}

.bet-select button:active,
.action-buttons button:active {
  transform: scale(0.96);
}

.hint {
  color: var(--muted);
  font-size: 0.8rem;
  margin: 0.75rem 0 0;
  text-align: center;
}

.how-to-play {
  max-width: 560px;
  width: 100%;
  margin-top: 1rem;
}

.how-to-play h2 {
  font-size: 1.1rem;
}

.how-to-play ul {
  color: var(--muted);
  line-height: 1.7;
  padding-left: 1.25rem;
  font-size: 0.9rem;
}
