/*
 * guide.css — Burraco-specific figure geometry on top of _shared/base.css.
 * Only layout + shape here; every colour comes from the --gc-* theme
 * variables. Cards are REAL faces (gc-cardimg + data-card) — no abstract
 * card tokens.
 */

/* ---- Generic felt rows ---------------------------------------------------- */
.bu-feltrow {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 16px;
}

/* Draw / pot figures: pile → arrow → hand. */
.bu-drawfig {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 14px 16px;
}
.bu-arrow {
  font-size: clamp(18px, 5vw, 26px);
  font-weight: 800;
  color: color-mix(in srgb, var(--gc-text) 45%, transparent);
}

/* Tighter card overlap for long rows (7-card burracos, the taken pile). */
.bu-tightrow { --overlap: -26px; }
.bu-seven { --overlap: -34px; }

/* A card sitting slightly apart from the row (the joker aside the run). */
.bu-aside { margin-left: 14px; }

/* Two mini-figures side by side (run + set). */
.bu-pairfigs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 5vw, 28px);
}

/* Stacked clean-vs-dirty contrast (the frames are wide 7-card rows; gc-vs is
   a grid, so stacking = a single column). */
.bu-vscol { grid-template-columns: 1fr; }
.bu-vslabel {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 700;
  color: color-mix(in srgb, var(--gc-text) 75%, transparent);
}

/* Number chip used beside labels (all numerals live in markup). */
.bu-chipnum {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 24px;
  padding: 0 8px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 13px;
  color: var(--gc-bg);
  background: var(--gc-warning);
}
.bu-chipnum.dim { background: color-mix(in srgb, var(--gc-text) 35%, transparent); color: var(--gc-text); }
.bu-chipnum.neg { background: color-mix(in srgb, var(--gc-error) 85%, var(--gc-text)); }

/* ---- Point fan (score chapter) ------------------------------------------- */
.bu-points {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(6px, 2.5vw, 14px);
  padding-bottom: 10px;
  max-width: 460px;
}

/* ---- Worked deal ---------------------------------------------------------- */
.bu-worked {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}
.bu-meldline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Tally rows: label left, signed number right. */
.bu-tally {
  width: 100%;
  max-width: 360px;
  margin: 10px auto 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.bu-tally-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 14px;
  background: color-mix(in srgb, var(--gc-text) 7%, transparent);
}
.bu-tally-row.total {
  font-weight: 800;
  background: color-mix(in srgb, var(--gc-warning) 25%, transparent);
  border: 1px solid var(--gc-warning);
}
.bu-tally-row.opp { margin-top: 6px; }
.bu-tally-num { font-weight: 800; font-variant-numeric: tabular-nums; }
.bu-tally-num.neg { color: color-mix(in srgb, var(--gc-error) 85%, var(--gc-text)); }
.bu-tally-cards {
  display: flex;
  align-items: center;
  gap: 6px;
}
.bu-tally-cards .gc-cardimg { width: 30px; }

/* Match-target strip: deal totals climbing to the flag. */
.bu-target {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 6px;
}
.bu-hchip {
  padding: 5px 12px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--gc-text);
  background: color-mix(in srgb, var(--gc-text) 10%, transparent);
  border: 1px solid var(--gc-border);
}
.bu-hchip.goal {
  color: var(--gc-bg);
  background: var(--gc-warning);
  border-color: transparent;
}

/* ---- Pot stack (pozzetto chapter) ----------------------------------------- */
.bu-potstack {
  position: relative;
  display: inline-block;
  width: calc(var(--gc-card-w) * 0.72 + 12px);
  height: calc(var(--gc-card-w) * 0.72 * 1.4 + 12px);
}
.bu-potstack > * { position: absolute; left: 0; top: 0; }
.bu-potstack > *:nth-child(2) { left: 5px; top: 5px; }
.bu-potstack > *:nth-child(3) { left: 10px; top: 10px; }

/* ---- Play-screen mock (interface chapter) --------------------------------- */
.bu-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 380px;
  padding: 14px 12px 16px;
}
.bu-meldstrip { align-self: stretch; display: flex; justify-content: flex-start; padding-left: 6px; }
.bu-teammeld {
  padding: 6px 10px;
  border-radius: 10px;
  border: 1.5px dashed color-mix(in srgb, var(--gc-accent) 70%, transparent);
}
.bu-pilesrow {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(10px, 4vw, 20px);
}
.bu-pile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.bu-pilelabel {
  font-size: 11px;
  font-weight: 700;
  color: color-mix(in srgb, var(--gc-text) 60%, transparent);
}
.bu-golden .gc-cardimg { outline: 2px solid var(--gc-warning); outline-offset: 2px; border-radius: 8px; }
.bu-sel { outline: 2px solid var(--gc-accent); outline-offset: 1px; border-radius: 8px; }
.bu-myhand { --overlap: -20px; }
.bu-btnrow { display: flex; gap: 10px; }
.bu-btn {
  padding: 6px 16px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 13px;
  color: var(--gc-bg);
  background: var(--gc-accent);
}
.bu-btn.ghost {
  color: var(--gc-text);
  background: color-mix(in srgb, var(--gc-text) 10%, transparent);
  border: 1px solid var(--gc-border);
}
