/* Object-first controls inside the existing club. Board material colors stay local. */
.pg-guide {
  margin: 14px 0 22px;
  padding: 16px 18px;
  background: var(--club-light-blue, #e6eeff);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
}
.pg-steps {
  display: flex;
  gap: 0;
  list-style: none;
  padding: 0;
  margin: 0 0 10px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
}
.pg-steps li {
  padding: 5px 12px;
  border-bottom: 2px solid var(--line);
}
.pg-steps .current {
  color: var(--ink);
  font-weight: 800;
  border-color: var(--club-blue, #3468d5);
}
.pg-instruction strong {
  font-size: 15px;
}
.pg-instruction p {
  font-size: 13px;
  line-height: 1.85;
  margin: 5px 0 0;
  color: var(--muted);
  max-width: 72ch;
}
.pg-turn-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.pg-turn-actions .st-action {
  min-height: 44px;
  padding: 9px 14px;
  border-radius: 6px;
  border: 1px solid #afc2df;
  font: inherit;
}
.pg-turn-actions button[aria-pressed="true"] {
  background: var(--club-panel, #1d3150);
  color: #fff;
}
.pg-action-chooser {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.pg-action-chooser label {
  display: grid;
  gap: 5px;
  flex: 1;
  min-width: 0;
  font-size: 13px;
}
.pg-action-chooser select,
.pg-hand-heading select {
  font: inherit;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 10px;
  color: var(--ink);
  background: var(--surface);
  max-width: 100%;
}
.pg-table-area {
  position: relative;
  min-width: 0;
}
.pg-context {
  position: absolute;
  z-index: 15;
  width: min(320px, 100%);
  max-height: 440px;
  overflow: auto;
  padding: 16px !important;
  margin: 0 !important;
  background: var(--surface) !important;
  border: 1px solid #9bafcc !important;
  border-radius: 10px;
  box-shadow: 0 10px 28px #14213b33;
  color: var(--ink);
  text-align: right;
  scroll-margin-block: 20px;
}
.pg-context-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.pg-context-head > .btn {
  padding: 6px 12px;
  min-height: 44px;
}
.pg-context .st-selection-detail {
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
}
.pg-context .st-selection-detail h3 {
  font-size: 15px;
  margin-top: 0;
}
.pg-context .st-selection-detail p {
  font-size: 13px;
  line-height: 1.85;
}
.pg-context .st-return {
  display: none;
}
.pg-context-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.pg-context-actions .st-action {
  width: 100%;
  padding: 10px;
  min-height: 44px;
  font-size: 14px;
  border-radius: 6px;
  border: 1px solid #afc2df;
}
.pg-context-actions .st-action:first-child {
  background: var(--club-blue) !important;
  color: #fff !important;
  border-color: var(--club-blue);
}
.pg-alternate {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.pg-alternate summary {
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  color: var(--muted);
}
.pg-alternate .st-actions {
  max-height: 280px;
  overflow: auto;
}
.pg-alternate p,
.pg-note {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.9;
}
.pg-legal {
  cursor: pointer;
}
.st-map .pg-legal {
  outline: 2px solid var(--club-blue);
  outline-offset: 2px;
}
.st-map .pg-legal:hover {
  outline-color: var(--orange);
}
.st-map .st-road-target.pg-legal {
  background: #fff1bc;
  outline: 2px solid #1e3c68;
}
.pg-direct-map .st-vertex.available {
  width: 22px;
  height: 22px;
  font-size: 14px;
}
.guided-strategy .st-land-place.available {
  background: #e1edff;
  border: 2px dashed var(--club-blue);
}
.guided-strategy .st-land-place.available:hover {
  background: #bdd2fb;
}
.guided-strategy .st-land-place svg {
  width: 100%;
  height: 100%;
  opacity: 0.75;
}
.pg-gem-bank {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.pg-gem {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 90px;
  flex: 1;
  padding: 12px 8px;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}
.pg-gem > i {
  width: 32px;
  height: 32px;
  display: block;
  background: var(--gem);
  border: 3px double #78879b;
  border-radius: 50%;
}
.pg-gem strong {
  font-size: 13px;
}
.pg-gem span {
  font-size: 12px;
  color: var(--muted);
}
.pg-gem.selected {
  border: 2px solid var(--club-blue);
  background: #e6eeff;
}
.pg-gem:disabled {
  opacity: 0.65;
  cursor: default;
}
.pg-gem-pick {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 20px;
  font-size: 13px;
}
.pg-gem-pick .st-action,
.pg-reserve-decks .st-action {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.pg-reserve-decks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.pg-meeple-choice {
  text-align: center;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin: 20px auto;
}
.pg-meeple-choice h3 {
  font-size: 15px;
}
.pg-meeple-tile {
  position: relative;
  width: 190px;
  margin: 12px auto;
}
.pg-meeple-tile > svg {
  width: 100%;
  display: block;
}
.pg-meeple-spot {
  position: absolute;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: #ffffffe6;
  border: 2px solid var(--club-blue);
  border-radius: 50%;
}
.pg-meeple-spot .st-meeple {
  position: static;
  width: 24px;
  height: 30px;
  display: block;
  transform: none;
}
.pg-meeple-choice > .st-action {
  padding: 10px 16px;
  min-height: 44px;
  border-radius: 6px;
  border: 1px solid var(--line);
}
.guided-strategy .st-pattern:not(:disabled) {
  outline: 2px solid var(--club-blue);
  outline-offset: 2px;
  background: #e6eeff;
}
.guided-strategy .st-pattern:not(:disabled):hover {
  background: #c8dcff;
}
.guided-strategy .st-tile-button:not(:disabled):hover {
  outline: 2px solid var(--club-blue);
}
.guided-strategy .st-patterns {
  gap: 10px;
}
.guided-strategy .st-pattern {
  min-height: 44px;
}
.pg-your-hand {
  margin-top: 22px;
}
.pg-hand-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}
.pg-hand-heading h3 {
  font-size: 16px;
  margin: 0;
}
.pg-hand-heading small {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}
.pg-hand-heading label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}
.pg-hand {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: start;
  justify-content: center;
}
.pg-hand-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  border: 2px solid transparent;
  border-radius: 9px;
  padding: 4px;
  background: transparent;
  min-width: 0;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}
.pg-hand-card > .card,
.pg-hand-card .playing-card,
.pg-hand-card .pg-uno-card {
  width: 84px;
  min-width: 0;
  max-width: 100%;
}
.pg-hand-card > span:last-child {
  font-size: 11px;
  min-height: 18px;
}
.pg-hand-card.playable {
  border-color: #8eaadb;
  background: #f1f6ff;
}
.pg-hand-card.selected {
  outline: 3px solid var(--club-orange);
  outline-offset: 2px;
  background: #fff4df;
}
.pg-hand-card:disabled {
  cursor: default;
  opacity: 0.72;
}
.pg-hand-card:disabled .card {
  filter: saturate(0.75);
}
.pg-hand-card.playable:hover {
  border-color: var(--club-blue);
}
.pg-card-choice {
  margin: 16px 0;
  padding: 14px 16px;
  background: var(--club-light-blue);
  border: 1px solid #afc2df;
  border-radius: 8px;
  scroll-margin: 18px;
}
.pg-card-choice > div:first-child {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.pg-card-choice p {
  font-size: 13px;
  margin: 8px 0;
}
.pg-wild-options,
.pg-trump-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.pg-wild-options .btn,
.pg-trump-options .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1;
  min-width: 90px;
  min-height: 48px;
}
.pg-wild-options i,
.pg-active-suit i {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid #52627b;
  display: inline-block;
}
.pg-suit {
  width: 24px;
  height: 24px;
  display: inline-block;
  fill: #24364f;
  vertical-align: middle;
}
.pg-suit.suit-hearts,
.pg-suit.suit-diamonds {
  fill: #b12d43;
}
.pg-card-table-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 44px;
  background: var(--club-panel);
  border-radius: 10px;
  min-height: 225px;
  padding: 20px;
  color: #fff;
}
.pg-card-table-center > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.pg-card-table-center .playing-card,
.pg-card-table-center .card {
  width: 96px;
}
.pg-card-table-center .pg-suit {
  fill: #fff;
}
.pg-card-table-center .pg-active-suit {
  margin: 0;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pg-draw-pile small {
  color: #cad7ed;
  font-size: 12px;
}
.pg-draw-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: transparent !important;
  color: #fff !important;
  border: 1px solid #8fa7cb;
  padding: 10px !important;
  font-size: 13px;
}
.pg-deck-back {
  display: block;
  width: 74px;
  height: 110px;
  border: 4px solid #e0e8f6;
  border-radius: 8px;
  background: #3468d5;
  padding: 8px;
  box-shadow: 3px 3px 4px #07162e66;
}
.pg-deck-back svg {
  height: 100%;
  width: 100%;
  fill: none;
  stroke: #cad7ed;
  stroke-width: 2;
}
.pg-uno-card.uno-card {
  display: inline-block;
  width: 88px;
  height: auto;
  aspect-ratio: 2/3;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: 0 3px 7px #14213b26;
  border-radius: 9px;
  overflow: hidden;
}
.pg-uno-card > svg {
  width: 100%;
  height: 100%;
  display: block;
}
.pg-uno-number {
  font-family: Vazirmatn, Tahoma, sans-serif;
  font-size: 44px;
  font-weight: 900;
  fill: currentColor;
  stroke: none;
}
.pg-uno-symbol {
  color: var(--ink);
}
.pg-uno-corner {
  font-family: Vazirmatn, Tahoma, sans-serif;
  font-size: 18px;
  font-weight: 800;
}
.pg-hokm-table {
  background: var(--club-panel);
  border-radius: 10px;
  padding: 18px;
  color: #fff;
  min-height: 210px;
}
.pg-trump-label {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  margin-bottom: 18px;
}
.pg-trump-label .pg-suit {
  background: #fff;
  border-radius: 5px;
  padding: 3px;
  width: 30px;
  height: 30px;
}
.pg-hokm-table .hokm-trick {
  min-height: 145px;
  align-items: center;
  margin: 0;
}
.pg-hokm-table .hokm-trick > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}
.pg-hokm-table .hokm-trick strong {
  font-size: 12px;
  color: #fff;
}
.pg-hokm-table .hokm-trick small {
  font-size: 11px;
  color: #cad7ed;
}
.pg-hokm-table .pg-note {
  color: #cad7ed;
}
.pg-bg-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.pg-dice {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.pg-die {
  width: 44px;
  height: 44px;
  background: #fff;
  border: 1px solid #9aaac1;
  border-radius: 7px;
  display: block;
  box-shadow: 0 2px 4px #14213b20;
}
.pg-die svg {
  width: 100%;
  height: 100%;
  fill: var(--ink);
}
.pg-backgammon .bg-point.pg-bg-target {
  outline: 3px solid #f5a14a;
  outline-offset: -3px;
}
.pg-bg-arrival {
  position: absolute;
  left: 50%;
  top: 45%;
  transform: translate(-50%, -50%);
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  background: #f5a14a;
  color: #14213b;
  font-size: 14px;
  font-weight: bold;
  border: 2px solid #fff;
  border-radius: 50%;
  z-index: 3;
}
.pg-bear-off {
  margin-top: 12px;
  text-align: center;
}
.play-guided button:focus-visible,
.guided-strategy button:focus-visible,
.guided-strategy select:focus-visible,
.play-guided select:focus-visible {
  outline: 3px solid #ad4c13;
  outline-offset: 3px;
}
.pg-context:focus,
.pg-card-choice:focus,
.pg-guide:focus {
  outline: 2px solid var(--club-blue);
  outline-offset: 2px;
}
@media (max-width: 600px) {
  .pg-guide {
    padding: 12px;
    margin-block: 12px 18px;
  }
  .pg-steps {
    font-size: 12px;
  }
  .pg-steps li {
    padding: 5px 8px;
  }
  .pg-instruction strong {
    font-size: 14px;
  }
  .pg-instruction p {
    font-size: 12px;
  }
  .pg-context {
    width: min(290px, 100%);
    max-height: 350px;
    padding: 12px !important;
  }
  .pg-gem {
    min-width: 72px;
  }
  .pg-direct-map .st-vertex.available {
    width: 18px;
    height: 18px;
    font-size: 12px;
  }
  .pg-direct-map .st-road-target {
    min-width: 18px;
    min-height: 10px;
  }
  .pg-hand {
    gap: 6px;
  }
  .pg-hand-card {
    padding: 2px;
  }
  .pg-hand-card > .card,
  .pg-hand-card .playing-card,
  .pg-hand-card .pg-uno-card {
    width: 64px;
  }
  .pg-hand-card > span:last-child {
    font-size: 10px;
  }
  .pg-card-table-center {
    gap: 24px;
    min-height: 205px;
    padding: 16px;
  }
  .pg-hand-heading {
    align-items: start;
  }
  .pg-hand-heading label {
    width: 100%;
    justify-content: space-between;
  }
  .pg-card-choice {
    padding: 12px;
  }
  .pg-wild-options .btn {
    min-width: 105px;
  }
  .pg-hokm-table {
    padding: 12px;
  }
  .pg-hokm-table .hokm-trick {
    gap: 6px;
    flex-wrap: wrap;
  }
  .pg-hokm-table .playing-card,
  .pg-hokm-table .card {
    width: 53px;
  }
  .pg-bg-arrival {
    width: 22px;
    height: 22px;
    font-size: 12px;
  }
  .pg-bear-off .btn {
    width: 100%;
  }
  .pg-turn-actions .st-action {
    font-size: 12px;
  }
  .pg-action-chooser {
    align-items: stretch;
  }
  .pg-action-chooser label,
  .pg-action-chooser > .btn {
    width: 100%;
    flex: auto;
  }
  .pg-meeple-tile {
    width: 160px;
  }
}
/* Inspection corrections: scalable card internals and the active Azul placement step. */
.play-guided .pg-hand .playing-card {
  height: auto;
  min-height: 0;
  aspect-ratio: 112/164;
  padding: 6px 4px;
}
.play-guided .pg-hand .card-pips {
  width: calc(100% - 24px);
  height: 76%;
  margin: auto;
}
.play-guided .pg-hand .playing-card .pip svg {
  width: 12px;
  height: 14px;
}
.play-guided .pg-hand .playing-card .ace-pip .pip svg {
  width: 28px;
  height: 32px;
}
.play-guided .pg-hand .card-corner {
  top: 5px;
  left: 4px;
}
.play-guided .pg-hand .card-corner.bottom-corner {
  top: auto;
  left: auto;
  bottom: 5px;
  right: 4px;
}
.play-guided .pg-hand .card-rank {
  font-size: 13px;
  min-height: 15px;
}
.play-guided .pg-hand .card-corner svg {
  width: 9px;
  height: 9px;
}
.play-guided .pg-hand .card-name {
  font-size: 9px;
  left: 15px;
  right: 15px;
  bottom: 3px;
}
.pg-hokm-table .hokm-trick {
  background: transparent;
  padding: 10px;
}
.pg-hokm-table .hokm-trick .pg-note {
  color: #cad7ed;
}
.pg-backgammon .bg-row.bottom .pg-bg-arrival {
  transform: translate(-50%, -50%) rotate(180deg);
}
.pg-picked-tiles {
  padding: 14px 16px;
  background: #e6eeff;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 18px;
}
.pg-picked-tiles > div {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}
.pg-remaining-factories {
  margin-top: 20px;
  font-size: 13px;
}
.pg-remaining-factories summary {
  min-height: 44px;
  cursor: pointer;
  display: flex;
  align-items: center;
}
@media (max-width: 600px) {
  .play-guided .pg-hand .playing-card .pip svg {
    width: 9px;
    height: 11px;
  }
  .play-guided .pg-hand .playing-card .ace-pip .pip svg {
    width: 22px;
    height: 26px;
  }
  .play-guided .pg-hand .card-pips {
    width: calc(100% - 22px);
    height: 70%;
  }
  .play-guided .pg-hand .card-rank {
    font-size: 11px;
    min-height: 13px;
  }
  .play-guided .pg-hand .card-corner svg {
    width: 8px;
    height: 8px;
  }
  .play-guided .pg-hand .card-name {
    font-size: 8px;
  }
  .guided-strategy .st-gem-tier {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .guided-strategy .st-tier-label {
    grid-column: 1/-1;
    writing-mode: horizontal-tb;
    text-align: right;
    font-size: 13px;
  }
  .guided-strategy .st-gem-card {
    padding: 10px;
    gap: 10px;
    min-height: 115px;
  }
  .guided-strategy .st-gem-card > strong {
    font-size: 12px;
  }
  .guided-strategy .st-card-cost > span {
    width: 21px;
    height: 21px;
    font-size: 11px;
  }
  .guided-strategy .st-gem-card-head b {
    font-size: 1.2rem;
  }
  .guided-strategy .st-noble {
    flex: 1;
    min-width: 76px;
  }
  .guided-strategy .st-train-card > span {
    font-size: 9px;
  }
}
