/* Belote — a four-player card table. The card art is the shared Vector Playing
   Cards SVGs, rendered whole (the black outline is the die-cut: never cropped,
   never boxed). Scoped to .bel-root, tokens from the shell, a green felt surface
   inside the board only. */

.bel-root {
  --bel-gold: #b68235;
  --bel-felt-1: #2f7d4f;
  --bel-felt-2: #206040;
  --bel-felt-3: #184e34;
  --bel-ink: #f4f1ea;
  inline-size: 100%;
  max-inline-size: 680px;
  margin: 0 auto;
  color: var(--bel-ink);
  font-family: var(--font-body, "Lora", Georgia, serif);
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 2vw, 14px);
}

/* ── Table surface ─────────────────────────────────────────────────────────── */
.bel-table {
  background: radial-gradient(130% 110% at 50% 12%, var(--bel-felt-1) 0%, var(--bel-felt-2) 58%, var(--bel-felt-3) 100%);
  border-radius: var(--radius-md, 12px);
  padding: clamp(10px, 3vw, 20px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), inset 0 2px 30px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1.5vw, 12px);
}

.bel-seat { display: flex; flex-direction: column; align-items: center; gap: 4px; min-block-size: 1px; }
.bel-name {
  font-family: var(--font-heading, "Cormorant Garamond", serif);
  font-size: clamp(12px, 2.6vw, 15px);
  letter-spacing: 0.04em;
  opacity: 0.82;
  text-align: center;
  padding: 1px 8px;
  border-radius: 999px;
  transition: color 0.15s, background 0.15s;
}
.bel-name.bel-active { opacity: 1; color: #fff; background: rgba(182, 130, 53, 0.55); box-shadow: 0 0 0 1px rgba(182, 130, 53, 0.9); }

.bel-backs { display: flex; justify-content: center; min-block-size: 1px; }
.bel-north .bel-backs, .bel-south .bel-name { justify-content: center; }
.bel-north .bel-backs .bel-back { margin-inline-start: -30px; }
.bel-north .bel-backs .bel-back:first-child { margin-inline-start: 0; }

/* West / East stack their backs vertically to save width. */
.bel-midrow { display: flex; align-items: stretch; justify-content: space-between; gap: clamp(6px, 2vw, 14px); }
.bel-west, .bel-east { flex: 0 0 auto; justify-content: center; }
.bel-west .bel-backs, .bel-east .bel-backs { flex-direction: column; }
.bel-west .bel-backs .bel-back, .bel-east .bel-backs .bel-back { margin-block-start: -46px; }
.bel-west .bel-backs .bel-back:first-child, .bel-east .bel-backs .bel-back:first-child { margin-block-start: 0; }

/* ── Center: trick area + info ─────────────────────────────────────────────── */
.bel-center { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; }
.bel-trick {
  position: relative;
  inline-size: clamp(150px, 42vw, 230px);
  block-size: clamp(150px, 42vw, 230px);
  margin: 0 auto;
}
.bel-slot { position: absolute; inline-size: clamp(46px, 13vw, 72px); display: flex; justify-content: center; }
.bel-slot .bel-card { inline-size: 100%; block-size: auto; }
.bel-slot-N { top: 0; left: 50%; transform: translateX(-50%); }
.bel-slot-S { bottom: 0; left: 50%; transform: translateX(-50%); }
.bel-slot-W { left: 0; top: 50%; transform: translateY(-50%); }
.bel-slot-E { right: 0; top: 50%; transform: translateY(-50%); }

.bel-info {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  text-align: center; pointer-events: none;
}
.bel-trumplabel, .bel-retlabel {
  font-family: var(--font-heading, "Cormorant Garamond", serif);
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.85;
}
.bel-trumpsym { font-size: clamp(26px, 8vw, 40px); line-height: 1.1; }
.bel-retcard { inline-size: clamp(42px, 12vw, 62px); margin: 2px auto 0; }
.bel-retcard .bel-card { inline-size: 100%; }

.bel-suit-H, .bel-suit-D { color: #ff6a5a; }
.bel-suit-C, .bel-suit-S { color: var(--bel-ink); }

/* ── Cards ─────────────────────────────────────────────────────────────────── */
.bel-card { display: block; border-radius: 5px; block-size: auto; }
.bel-back { inline-size: clamp(30px, 8vw, 46px); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); }

/* ── Scores ────────────────────────────────────────────────────────────────── */
.bel-scores { display: flex; align-items: center; justify-content: center; gap: clamp(10px, 3vw, 22px); }
.bel-scorecell { display: inline-flex; align-items: baseline; gap: 6px; font-variant-numeric: tabular-nums; }
.bel-teamname { font-family: var(--font-heading, "Cormorant Garamond", serif); font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-neutral-500, #8a8578); }
.bel-scorecell b { font-family: var(--font-heading, "Cormorant Garamond", serif); font-weight: 600; font-size: clamp(20px, 5vw, 26px); color: var(--color-text, #23201b); }
.bel-us b { color: var(--bel-gold); }
.bel-target { font-size: 12px; color: var(--color-neutral-400, #a8a293); font-variant-numeric: tabular-nums; }

/* ── Status ────────────────────────────────────────────────────────────────── */
.bel-status {
  text-align: center;
  font-family: var(--font-heading, "Cormorant Garamond", serif);
  font-size: clamp(15px, 3.6vw, 20px);
  min-block-size: 1.5em;
  color: var(--color-text, #23201b);
}

/* ── Bidding / continue panel ──────────────────────────────────────────────── */
.bel-panel { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; min-block-size: 1px; }
.bel-panel[hidden] { display: none; }
.bel-bidprompt { flex-basis: 100%; text-align: center; font-family: var(--font-heading, "Cormorant Garamond", serif); font-size: 15px; }
.bel-suitrow { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; flex-basis: 100%; }

.bel-btn {
  font-family: var(--font-heading, "Cormorant Garamond", serif);
  font-size: 15px;
  padding: 8px 18px;
  border-radius: var(--radius-sm, 8px);
  border: 1px solid var(--color-neutral-400, #c9c3b5);
  background: #fff;
  color: #23201b; /* fixed: white bg, text must not flip in dark mode */
  cursor: pointer;
  transition: transform 0.1s, background 0.15s, border-color 0.15s;
}
.bel-btn:hover { border-color: var(--bel-gold); }
.bel-btn:active { transform: translateY(1px); }
.bel-btn-primary { background: var(--bel-gold); border-color: var(--bel-gold); color: #fff; }
.bel-btn-primary:hover { background: #a2732c; }
.bel-suitbtn { display: inline-flex; align-items: center; gap: 6px; }
.bel-suitbtn .bel-suit-H, .bel-suitbtn .bel-suit-D { color: #d13b2c; }
.bel-suitbtn .bel-suit-C, .bel-suitbtn .bel-suit-S { color: #23201b; }

/* ── Human hand ────────────────────────────────────────────────────────────── */
.bel-hand { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end; gap: 4px; min-block-size: clamp(60px, 16vw, 96px); }
.bel-cardwrap { line-height: 0; position: relative; transition: transform 0.12s; }
.bel-cardwrap .bel-card { inline-size: clamp(42px, 10vw, 66px); }
.bel-istrump .bel-card { box-shadow: 0 0 0 2px var(--bel-gold); border-radius: 6px; }
.bel-playable .bel-card { cursor: pointer; box-shadow: 0 2px 7px rgba(0, 0, 0, 0.28); }
.bel-istrump.bel-playable .bel-card { box-shadow: 0 0 0 2px var(--bel-gold), 0 2px 7px rgba(0, 0, 0, 0.28); }
.bel-playable:hover { transform: translateY(-10px); }
.bel-muted { opacity: 0.4; }
.bel-muted .bel-card { cursor: default; }
.bel-hint .bel-card { animation: bel-pulse 1.1s ease; }

@keyframes bel-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(182, 130, 53, 0); }
  30% { box-shadow: 0 0 0 4px rgba(182, 130, 53, 0.85); transform: translateY(-8px); }
}

/* ── Dark mode ─────────────────────────────────────────────────────────────── */
.bel-root.mode-dark .bel-table {
  background: radial-gradient(130% 110% at 50% 12%, #245c3c 0%, #1a4830 58%, #123522 100%);
}
.bel-root.mode-dark .bel-status,
.bel-root.mode-dark .bel-scorecell b { color: #ece7dc; }
.bel-root.mode-dark .bel-teamname { color: #b9b3a4; }
.bel-root.mode-dark .bel-us b { color: #d9a54e; }
.bel-root.mode-dark .bel-btn { background: #2a2721; color: #ece7dc; border-color: #4a463c; }
.bel-root.mode-dark .bel-btn-primary { background: var(--bel-gold); color: #1a1712; border-color: var(--bel-gold); }
.bel-root.mode-dark .bel-suitbtn .bel-suit-C, .bel-root.mode-dark .bel-suitbtn .bel-suit-S { color: #ece7dc; }
.bel-root.mode-dark .bel-suitbtn .bel-suit-H, .bel-root.mode-dark .bel-suitbtn .bel-suit-D { color: #ff6a5a; }

/* ── Reduced motion ────────────────────────────────────────────────────────── */
.bel-root.no-motion .bel-cardwrap,
.bel-root.no-motion .bel-btn { transition: none; }
.bel-root.no-motion .bel-playable:hover { transform: none; }
.bel-root.no-motion .bel-hint .bel-card { animation: none; }
