/* Absolute Beginner lesson stage - calm, readable, game-like */

:root {
  --ab-ink: #1a2e28;
  --ab-ink-muted: #4a5f57;
  --ab-paper: #f3f6f4;
  --ab-stage: #e8efeA;
  --ab-felt: #1C5F51;
  --ab-felt-deep: #124539;
  --ab-accent: #c45c26;
  --ab-accent-hover: #a34b1d;
  --ab-ok: #1f6b4a;
  --ab-ok-bg: #dcefe6;
  --ab-warn-bg: #f7ebe3;
  --ab-line: #c5d4cc;
  --ab-card-face: #fffcf7;
  --ab-shadow: 0 8px 28px rgba(26, 46, 40, 0.12);
  --ab-radius: 16px;
  --ab-target: 48px;
  --ab-hand-gap: 0.28rem;
  --ab-card-w: 3.2rem;
  --ab-card-h: calc(var(--ab-card-w) * 1.4);
}

/* global.css sets overflow-x: hidden on html/body, which turns them into
   scroll containers and silently disables position: sticky for the action
   bar. clip prevents horizontal overflow without breaking sticky.
   Only applies to Absolute Beginner lesson pages (this sheet loads there). */
html,
body {
  overflow-x: clip;
}

/* Activities toggle visibility with the `hidden` attribute, but any class
   that sets `display` (.ab-hand, .ab-step, .ab-trick-piles, ...) overrides
   the browser's built-in [hidden] rule, leaving "hidden" elements taking up
   space. Restate it with priority so `hidden` always wins. */
[hidden] {
  display: none !important;
}

.ab-page {
  min-height: calc(100vh - 4rem);
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(28, 95, 81, 0.12), transparent),
    linear-gradient(180deg, var(--ab-paper) 0%, #dfe8e3 100%);
  padding: 0.75rem 1rem 2rem;
  color: var(--ab-ink);
}

.ab-stage {
  max-width: 52rem;
  margin: 0 auto;
  background: var(--ab-stage);
  border: 1px solid var(--ab-line);
  border-radius: calc(var(--ab-radius) + 4px);
  box-shadow: var(--ab-shadow);
  padding: 1rem 1.25rem;
}

.ab-header {
  margin-bottom: 0.75rem;
}

.ab-header__meta {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.ab-pathway {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ab-ink-muted);
}

.ab-lesson-count {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ab-ink);
}

.ab-progress {
  height: 0.3rem;
  margin-top: 0.4rem;
  background: rgba(28, 95, 81, 0.15);
  border-radius: 999px;
  overflow: hidden;
}

.ab-progress__bar {
  height: 100%;
  background: var(--ab-felt);
  border-radius: inherit;
  transition: width 0.35s ease;
}

.ab-back,
.ab-replay {
  min-height: var(--ab-target);
  min-width: var(--ab-target);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.85rem;
  color: var(--ab-ink-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
}

.ab-back:hover,
.ab-back:focus-visible,
.ab-replay:hover,
.ab-replay:focus-visible {
  color: var(--ab-ink);
  background: rgba(26, 46, 40, 0.06);
  outline: none;
}

.ab-replay:focus-visible {
  outline: 3px solid rgba(28, 95, 81, 0.35);
  outline-offset: 2px;
}

.ab-title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.35rem, 3vw, 1.65rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--ab-ink);
}

.ab-intro {
  margin: 0 0 0.75rem;
  font-size: clamp(1rem, 2.2vw, 1.1rem);
  line-height: 1.4;
  color: var(--ab-ink-muted);
  max-width: 38rem;
}

.ab-play-area {
  background: var(--ab-felt);
  background-image:
    radial-gradient(ellipse at 30% 20%, rgba(255, 255, 255, 0.08), transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(0, 0, 0, 0.12), transparent 45%);
  border-radius: var(--ab-radius);
  min-height: 14rem;
  padding: 0.9rem 1rem;
  color: #f4faf7;
  position: relative;
  container-type: inline-size;
  /* 13 cards + 12 gaps in one row, shared by every lesson */
  --ab-card-w: clamp(2.35rem, calc((100cqi - 12 * var(--ab-hand-gap)) / 13), 3.2rem);
  --ab-card-h: calc(var(--ab-card-w) * 1.4);
}

/* Beat senior-friendly `p { color: ? !important }` inside the felt stage */
.ab-play-area,
.ab-play-area p,
.ab-prompt,
.ab-round-meta {
  color: #f4faf7 !important;
}

/* Intro gate: the lesson point shown ON the felt before the activity starts,
   because testers looked straight at the green area and skipped the intro
   text above it. */

/* While the gate is up, everything around the felt (header, title, the
   duplicate intro line, Back/Replay) fades and blurs so the gate reads as
   a modal and the eye has exactly one place to go. */
.ab-header,
.ab-title,
.ab-intro,
.ab-actions {
  transition: filter 0.25s ease, opacity 0.25s ease;
}

.ab-stage--gated .ab-header,
.ab-stage--gated .ab-title,
.ab-stage--gated .ab-intro,
.ab-stage--gated .ab-actions {
  filter: blur(2.5px);
  opacity: 0.35;
  pointer-events: none;
  user-select: none;
}

.ab-stage--gated .ab-play-area {
  box-shadow: 0 10px 32px rgba(26, 46, 40, 0.3);
}

.ab-intro-gate {
  min-height: 12rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1.5rem 1rem;
  text-align: center;
}

.ab-intro-gate__kicker {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.8;
}

.ab-intro-gate__text {
  margin: 0;
  max-width: 34rem;
  font-size: clamp(1.15rem, 2.8vw, 1.4rem);
  font-weight: 500;
  line-height: 1.5;
}

/* Same button style as the site's game buttons (.stam-link et al). */
.ab-intro-gate__btn {
  appearance: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--ab-target);
  min-width: 11rem;
  margin-top: 0.25rem;
  padding: 0.9rem 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 8px;
  background: #FF8F00;
  color: #fff;
  font-family: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.28);
  transition: filter 0.2s ease, box-shadow 0.2s ease;
}

.ab-intro-gate__btn:hover,
.ab-intro-gate__btn:focus-visible {
  filter: brightness(0.92);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.35);
  outline: none;
}

.ab-feedback {
  margin-top: 0.75rem;
  padding: 0.7rem 1rem;
  border-radius: 12px;
  font-size: 1.05rem;
  line-height: 1.4;
  background: var(--ab-ok-bg);
  color: var(--ab-ok);
  border: 1px solid rgba(31, 107, 74, 0.25);
}

.ab-feedback[data-kind="incorrect"] {
  background: var(--ab-warn-bg);
  color: #7a3e1d;
  border-color: rgba(196, 92, 38, 0.3);
}

.ab-feedback[data-kind="neutral"] {
  background: #eef2f0;
  color: var(--ab-ink);
  border-color: var(--ab-line);
}

.ab-feedback--glow {
  animation: ab-feedback-glow 1.1s ease-out;
}

@keyframes ab-feedback-glow {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 220, 100, 0.75);
    border-color: rgba(255, 200, 80, 0.9);
  }
  40% {
    box-shadow: 0 0 20px 4px rgba(255, 220, 100, 0.55);
    border-color: rgba(255, 210, 100, 0.95);
  }
  100% {
    box-shadow: 0 0 0 0 transparent;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ab-feedback--glow {
    animation: none;
    box-shadow: 0 0 0 3px rgba(255, 220, 100, 0.55);
  }
}

.ab-fade-out {
  opacity: 0;
  transition: opacity 200ms ease;
}

.ab-fade-in {
  animation: ab-fade-in 260ms ease;
}

@keyframes ab-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ab-fade-out {
    transition: none;
  }

  .ab-fade-in {
    animation: none;
  }
}

/* Single bottom bar: Back + Replay on the left, Continue on the right.
   Sticky so Continue stays visible even when a lesson is taller than the viewport. */
.ab-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin: 0.75rem -1.25rem -1rem;
  padding: 0.45rem 1.25rem 0.6rem;
  min-height: 3.25rem;
  background: var(--ab-stage);
  border-top: 1px solid rgba(26, 46, 40, 0.08);
  border-radius: 0 0 var(--ab-radius) var(--ab-radius);
}

.ab-actions .ab-continue {
  margin-left: auto;
}

.ab-continue {
  appearance: none;
  border: none;
  cursor: pointer;
  min-height: var(--ab-target);
  min-width: 9rem;
  padding: 0.75rem 1.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 999px;
  background: var(--ab-accent);
  color: #fff;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.12);
}

.ab-continue:hover,
.ab-continue:focus-visible {
  background: var(--ab-accent-hover);
  outline: 3px solid rgba(196, 92, 38, 0.35);
  outline-offset: 2px;
}

.ab-continue:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ab-step {
  appearance: none;
  display: flex;
  width: fit-content;
  min-height: var(--ab-target);
  margin: 0.75rem auto 0;
  padding: 0.7rem 1.15rem;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.ab-step:hover,
.ab-step:focus-visible {
  background: rgba(255, 255, 255, 0.22);
  outline: 3px solid rgba(255, 224, 138, 0.7);
  outline-offset: 2px;
}

.ab-step:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ab-step[hidden] {
  display: none;
}

.ab-prompt {
  margin: 0 0 0.6rem;
  font-size: 1.1rem;
  text-align: center;
}

.ab-hand {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--ab-hand-gap);
  justify-content: center;
  align-items: flex-end;
  min-height: calc(var(--ab-card-h) + 0.75rem);
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.ab-hand--full {
  flex-wrap: wrap;
  overflow-x: visible;
  row-gap: 0.5rem;
}


.ab-table {
  display: grid;
  place-items: center;
  min-height: 7rem;
  margin-bottom: 1rem;
}

.ab-table-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
}

/* Compact table: North/South stacked in the centre column, West/East pulled in
   beside them. Two card-rows tall instead of three, so the felt stays short. */
.ab-compass-trick {
  --ab-compass-label-h: 1.5rem;
  --ab-compass-seat-h: calc(var(--ab-card-h) + var(--ab-compass-label-h) + 0.2rem);
  --ab-compass-side-offset: calc(var(--ab-card-w) + 1.6rem);
  position: relative;
  width: 100%;
  height: calc(var(--ab-compass-seat-h) * 2 + 0.9rem);
  margin: 0.35rem auto 0.75rem;
  box-sizing: border-box;
}

.ab-compass-trick__seat {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.15rem;
  min-width: var(--ab-card-w);
  height: var(--ab-compass-seat-h);
}

.ab-compass-trick__seat--north { top: 0; left: 50%; transform: translateX(-50%); }

/* South's label sits under its card so it hugs the bottom of the table */
.ab-compass-trick__seat--south {
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  flex-direction: column-reverse;
}
.ab-compass-trick__seat--west {
  top: 50%;
  left: 50%;
  transform: translate(calc(-50% - var(--ab-compass-side-offset)), -50%);
}
.ab-compass-trick__seat--east {
  top: 50%;
  left: 50%;
  transform: translate(calc(-50% + var(--ab-compass-side-offset)), -50%);
}

/* When instructions directly follow the table (no South hand in between,
   e.g. playing from dummy), reserve a card-height gap below "South (you)"
   so the prompt doesn't crowd the table and layout matches hand lessons. */
.ab-compass-trick:not([hidden]) + .ab-prompt,
.ab-compass-trick:not([hidden]) + .ab-instructions {
  margin-top: calc(var(--ab-card-h) + 0.75rem);
}

.ab-compass-trick__label {
  font-size: 1.05rem;
  line-height: var(--ab-compass-label-h);
  height: var(--ab-compass-label-h);
  white-space: nowrap;
  opacity: 0.9;
}

.ab-compass-trick__card {
  width: var(--ab-card-w);
  height: var(--ab-card-h);
  display: grid;
  place-items: center;
  flex: 0 0 var(--ab-card-h);
}

.ab-compass-trick__seat--lead .ab-compass-trick__label {
  color: #ffe08a;
  font-weight: 700;
}

.ab-compass-trick__seat--active {
  outline: 2px solid #ffe08a;
  outline-offset: 4px;
  border-radius: 10px;
}

.ab-compass-trick__seat--lead .ab-compass-trick__card {
  outline: 2px solid rgba(255, 224, 138, 0.85);
  outline-offset: 3px;
  border-radius: 0.65rem;
}

.ab-compass-trick--choosing .ab-compass-trick__seat {
  cursor: pointer;
}

.ab-compass-trick--choosing .ab-playing-card {
  pointer-events: auto;
  cursor: pointer;
}

.ab-compass-trick--choosing .ab-playing-card--selectable {
  box-shadow: 0 0 0 2px rgba(255, 224, 138, 0.55);
}

.ab-seat-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-rows: auto auto auto;
  gap: 0.75rem;
  align-items: center;
  justify-items: center;
  max-width: 28rem;
  margin: 0 auto 1rem;
}

.ab-seat {
  min-width: 5.5rem;
  min-height: var(--ab-target);
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.18);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}

.ab-seat:focus-visible {
  outline: 3px solid #ffe08a;
  outline-offset: 2px;
}

.ab-seat--north { grid-column: 2; grid-row: 1; }
.ab-seat--west { grid-column: 1; grid-row: 2; }
.ab-seat--east { grid-column: 3; grid-row: 2; }
.ab-seat--south { grid-column: 2; grid-row: 3; }
.ab-seat--selected {
  border-color: #ffe08a;
  background: rgba(255, 224, 138, 0.25);
}
.ab-seat--partner {
  box-shadow: 0 0 0 3px rgba(255, 224, 138, 0.55);
}
.ab-seat--opponent {
  opacity: 0.85;
}

.ab-choice-list {
  display: grid;
  gap: 0.65rem;
}

.ab-choice {
  appearance: none;
  width: 100%;
  min-height: var(--ab-target);
  text-align: left;
  padding: 0.9rem 1.1rem;
  font-size: 1.05rem;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 252, 247, 0.95);
  color: var(--ab-ink);
  cursor: pointer;
  font-weight: 500;
}

.ab-choice:hover,
.ab-choice:focus-visible {
  border-color: var(--ab-accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(196, 92, 38, 0.25);
}

.ab-choice--selected {
  border-color: var(--ab-felt);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(28, 95, 81, 0.35);
}

.ab-suit-bins {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

@media (min-width: 640px) {
  .ab-suit-bins {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.ab-suit-bin {
  min-height: 5.5rem;
  border-radius: 12px;
  border: 2px dashed rgba(255, 255, 255, 0.45);
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.12);
}

.ab-suit-bin__label {
  display: block;
  text-align: center;
  font-weight: 700;
  margin-bottom: 0.35rem;
  font-size: 1rem;
}

.ab-suit-bin__cards .ab-playing-card {
  /* Let clicks/drops hit the bin, not the already-sorted cards */
  pointer-events: none;
}

.ab-suit-bin--drag-over {
  border-style: solid;
  border-color: #fff;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 0 0 2px rgba(255, 224, 138, 0.7);
}

.ab-playing-card--dragging {
  opacity: 0.55;
  cursor: grabbing;
}

.ab-playing-card[draggable="true"] {
  cursor: grab;
}

/* Four-colour suits - matches the site-wide palette (lesson-designed.css) */
.ab-suit-bin--spades .ab-suit-bin__label { color: #0645ad; background: #fff; border-radius: 6px; }
.ab-suit-bin--hearts .ab-suit-bin__label { color: #e53935; background: #fff; border-radius: 6px; }
.ab-suit-bin--diamonds .ab-suit-bin__label { color: #f9a825; background: #fff; border-radius: 6px; }
.ab-suit-bin--clubs .ab-suit-bin__label { color: #2e7d32; background: #fff; border-radius: 6px; }

.ab-trick-piles {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 0.6rem;
}

/* Counter on the left, trick piles on the right, sharing one line */
.ab-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.4rem 0.75rem;
  margin-bottom: 0.4rem;
}

.ab-table-header .ab-round-meta {
  margin: 0;
  text-align: left;
}

/* margin-left keeps the piles right-aligned even when the counter is empty */
.ab-table-header .ab-trick-piles {
  margin: 0 0 0 auto;
  justify-content: flex-end;
}

.ab-trick-result {
  margin: 0.6rem auto 0;
  width: 100%;
  max-width: 28rem;
  min-height: 2.75rem;
  box-sizing: border-box;
  padding: 0.55rem 1rem;
  border-radius: 12px;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.35;
  color: #1a2e28;
  background: #ffe08a;
  border: 3px solid #fff6c8;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Collapse while empty; stays in the DOM so the live region keeps working */
.ab-trick-result--empty {
  min-height: 0;
  height: 0;
  margin: 0;
  padding: 0;
  border-width: 0;
  overflow: hidden;
  color: transparent;
  background: transparent;
  box-shadow: none;
}

.ab-trick-result--glow {
  animation: ab-trick-result-glow 1.2s ease-out;
}

@keyframes ab-trick-result-glow {
  0% {
    transform: scale(1.04);
    box-shadow:
      0 0 0 0 rgba(255, 224, 138, 0.95),
      0 0 28px 10px rgba(255, 236, 160, 0.85);
    border-color: #fff;
    background: #fff3b0;
  }
  45% {
    transform: scale(1.02);
    box-shadow:
      0 0 0 4px rgba(255, 224, 138, 0.7),
      0 0 36px 14px rgba(255, 220, 100, 0.65);
    border-color: #fff8d6;
    background: #ffe08a;
  }
  100% {
    transform: scale(1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
    border-color: #fff6c8;
    background: #ffe08a;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ab-trick-result--glow {
    animation: none;
    box-shadow:
      0 0 0 4px rgba(255, 224, 138, 0.85),
      0 2px 10px rgba(0, 0, 0, 0.28);
  }
}

/* Compact score chips - a single text line instead of stacked boxes */
.ab-trick-pile {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.2);
  text-align: center;
  font-size: 0.95rem;
  border: 2px solid rgba(255, 255, 255, 0.25);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ab-trick-pile strong {
  display: inline;
  margin: 0;
}

.ab-trick-pile--glow {
  animation: ab-trick-pile-glow 1.1s ease-out;
}

@keyframes ab-trick-pile-glow {
  0% {
    border-color: rgba(255, 236, 160, 0.95);
    box-shadow: 0 0 0 0 rgba(255, 220, 100, 0.7);
    background: rgba(255, 220, 100, 0.28);
  }
  40% {
    border-color: rgba(255, 230, 140, 0.9);
    box-shadow: 0 0 18px 4px rgba(255, 220, 100, 0.55);
    background: rgba(255, 220, 100, 0.22);
  }
  100% {
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 0 0 transparent;
    background: rgba(0, 0, 0, 0.2);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ab-trick-pile--glow {
    animation: none;
    border-color: rgba(255, 230, 140, 0.85);
    background: rgba(255, 220, 100, 0.2);
  }
}

.ab-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.ab-compare__col {
  background: rgba(255, 252, 247, 0.95);
  color: var(--ab-ink);
  border-radius: 12px;
  padding: 0.85rem 1rem;
}

.ab-compare__col h2 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.ab-compare__col ul {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.98rem;
  line-height: 1.4;
}

.ab-auction {
  width: 100%;
  max-width: 34rem;
  margin: 0 auto 1rem;
  padding: 0.9rem;
  box-sizing: border-box;
  border-radius: 12px;
  background: rgba(255, 252, 247, 0.95);
  color: var(--ab-ink);
}

.ab-auction h2 {
  margin: 0;
  font-size: 1.05rem;
}

.ab-auction__dealer {
  margin: 0.25rem 0 0.75rem;
  color: var(--ab-ink-muted) !important;
  font-size: 0.9rem;
}

.ab-auction__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--ab-line);
  border-left: 1px solid var(--ab-line);
}

.ab-auction__row {
  display: contents;
}

.ab-auction__heading,
.ab-auction__call {
  min-height: 2rem;
  display: grid;
  place-items: center;
  padding: 0.3rem;
  border-right: 1px solid var(--ab-line);
  border-bottom: 1px solid var(--ab-line);
  text-align: center;
}

.ab-auction__heading {
  background: rgba(28, 95, 81, 0.1);
  font-size: 0.82rem;
  font-weight: 700;
}

.ab-round-meta {
  text-align: center;
  margin: 0 0 0.5rem;
  opacity: 0.9;
  font-size: 0.95rem;
}

.ab-lead-note {
  margin: 0 0 0.6rem;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 600;
  color: #ffe08a !important;
}

.ab-trick-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.ab-trick-card__badge {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.85;
  min-height: 1.1rem;
}

.ab-trick-card--lead .ab-trick-card__badge {
  color: #ffe08a;
  opacity: 1;
}

.ab-trick-card__seat {
  font-size: 0.85rem;
  opacity: 0.9;
}

.ab-playing-card--lead {
  box-shadow: 0 0 0 3px #ffe08a, 0 2px 6px rgba(0, 0, 0, 0.18);
}

.ab-placeholder {
  text-align: center;
  padding: 2rem 1rem;
  font-size: 1.15rem;
  line-height: 1.5;
}

.ab-deal-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: auto auto auto;
  gap: 0.5rem;
  align-items: center;
  justify-items: stretch;
  max-width: 28rem;
  margin: 0.75rem auto;
  font-size: 1rem;
  min-height: 11rem;
}

.ab-deal-seat {
  min-width: 0;
  text-align: center;
  background: rgba(0, 0, 0, 0.18);
  border-radius: 10px;
  padding: 0.65rem;
}

.ab-deal-seat[data-seat="north"] { grid-column: 2; grid-row: 1; }
.ab-deal-seat[data-seat="west"] { grid-column: 1; grid-row: 2; }
.ab-deal-seat[data-seat="east"] { grid-column: 3; grid-row: 2; }
.ab-deal-seat[data-seat="south"] { grid-column: 2; grid-row: 3; }

@media (max-width: 520px) {
  .ab-stage {
    padding: 1rem;
  }

  .ab-actions {
    margin: 0.75rem -1rem -1rem;
    padding: 0.45rem 1rem 0.6rem;
  }

  .ab-play-area {
    padding: 0.85rem;
    min-height: 13rem;
  }

  .ab-compare {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ab-progress__bar,
  .ab-playing-card,
  .ab-playing-card--to-table {
    transition: none !important;
    animation: none !important;
  }
}
