/* ==========================================================================
   Perfils · modes.css (15/10/2026)
   --------------------------------------------------------------------------
   The two ways to play: classic (each one on their turn) and free table (everybody together).
   - setup: the "Modo de jogo" plaques
   - game: the "Vez de" banner with the Passar key, the scoreboard marker, the round dialog's next-turn line
   - rules: the little pictures of the two modes
   Loads after game.css and award.css, before extras.css. Built only on theme.css tokens.
   ========================================================================== */

/* ============================ setup: Modo de jogo ======================== */
.plaques--mode { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; }
.pq--mode .pq__face {
  align-content: start;
  gap: 0.55rem;
  min-height: 11.2rem;
  padding: 1.15rem 0.9rem 1rem;
}
.pq__seats { display: flex; align-items: flex-end; justify-content: center; gap: 0.7rem; min-height: 2.6rem; }
.pq__seat { position: relative; display: block; line-height: 0; }
.pq__seats--classic .pq__seat:not(.is-turn) { opacity: 0.5; }
.pq__seat.is-turn { transform: translateY(-3px); }
.pq__seat.is-turn::after {             /* the marker of whose turn it is, like the one under the picked pawn in the rules */
  content: '';
  position: absolute;
  left: 50%;
  bottom: -0.45rem;
  width: 0.7rem;
  height: 0.48rem;
  margin-left: -0.35rem;
  background: var(--p-black);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.pq--mode .pq__label { margin-top: 0.3rem; font-size: var(--fs-md); letter-spacing: var(--track-label); }
.pq__desc {
  max-width: 24ch;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--fs-sm);
  letter-spacing: 0;
  line-height: 1.38;
  text-transform: none;
  text-wrap: balance;
}
.pq--mode .pq__input:checked + .pq__face { transform: translateY(-1px); }

@media (max-width: 899px) { .step--mode { order: 2; } }   /* single column: players, mode, goal, difficulty... (screens.css orders the others) */
@media (max-width: 599px) {
  .plaques--mode { grid-template-columns: minmax(0, 1fr); }
  .pq--mode .pq__face { min-height: 0; grid-template-columns: auto minmax(0, 1fr); justify-items: start; text-align: left; column-gap: 1rem; row-gap: 0.25rem; padding: 0.9rem 1rem 0.9rem 1.7rem; }
  .pq--mode .pq__seats { grid-row: 1 / span 2; align-self: center; flex-direction: row; gap: 0.5rem; }
  .pq--mode .pq__label { margin: 0; align-self: end; }
  .pq__desc { align-self: start; max-width: none; text-wrap: pretty; }
}

/* ============================ game: "Vez de" banner ====================== */
/* A gold plate (the colour that means "lit" everywhere else) on the dark move panel: whose turn it is, and Passar. */
.turn {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: 'pawn text pass' 'note note note';
  align-items: center;
  gap: 0 0.75rem;
  padding: 0.4rem 0.5rem 0.4rem 0.7rem;
  color: var(--p-black);
  background: linear-gradient(180deg, var(--p-gold-glow) 0%, var(--p-orange) 55%, var(--p-gold-lo) 100%);
  border: 2px solid var(--p-black);
  border-radius: var(--r-2);
  box-shadow: inset 0 1px 0 rgb(255 252 235 / 0.9), inset 0 -2px 0 rgb(110 55 0 / 0.25), 0 0 0 2px rgb(244 235 173 / 0.5);
}
.turn[hidden] { display: none; }
.turn.is-swap { animation: turn-in var(--dur-3) var(--ease-out) both; }
@keyframes turn-in {
  from { opacity: 0.35; transform: translateX(-14px); filter: brightness(1.25); }
  to { opacity: 1; transform: none; filter: none; }
}
.turn__pawn { grid-area: pawn; display: block; line-height: 0; align-self: end; margin-bottom: -0.1rem; }
.turn__text { grid-area: text; display: grid; min-width: 0; margin: 0; gap: 0.05rem; }
.turn__kicker {
  font-family: var(--font-label);
  font-weight: 600;
  font-size: var(--fs-2xs);
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
  line-height: 1.1;
}
.turn__name {
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 1.3rem;
  letter-spacing: 0.03em;
  line-height: 1.15;
  overflow-wrap: anywhere;   /* who is up is key information: a 14-letter name wraps to a second line instead of being cut with "..." */
}
.turn__pass { grid-area: pass; }
.turn__pass .p-ic { width: 0.85rem; height: 0.85rem; }
.turn__note {
  grid-area: note;
  margin: 0.25rem 0 0.1rem;
  font-size: var(--fs-xs);
  font-weight: 700;
  line-height: 1.3;
}
.turn__note[hidden] { display: none; }
.zone-actions[data-mode='classic'] .play-hint { min-height: 0; }
.zone-actions[data-mode='classic'] .play-hint__lead { font-weight: 500; }

/* ============================ game: scoreboard marker ==================== */
.score-row.is-turn {
  background: linear-gradient(172deg, var(--p-gold-glow) 0%, #f1c46a 55%, var(--p-gold-hi) 100%);
  box-shadow: 0 3px 0 var(--p-black), 0 0 0 3px var(--p-cream), 0 0 0 5px var(--p-black), 0 8px 14px -4px rgb(232 163 58 / 0.55);
  transform: translateY(-2px);
}
.score-row.is-turn .score-pts small { color: var(--p-black); }
.score-row.is-turn .score-bar { background: rgb(255 253 248 / 0.7); }
.score-turn {
  position: absolute;
  left: 0.45rem;
  top: -0.78rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.12rem 0.5rem 0.12rem 0.4rem;
  font-family: var(--font-label);
  font-weight: 600;
  font-size: var(--fs-2xs);
  letter-spacing: 0.16em;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--p-cream);
  background: var(--p-black);
  border-radius: var(--r-1);
}
.score-turn[hidden] { display: none; }
.score-turn::before {
  content: '';
  width: 0.55rem;
  height: 0.48rem;
  background: var(--p-orange);
  clip-path: polygon(50% 100%, 0 0, 100% 0);
}
.score-row { transition: transform var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out); }

/* ============================ round dialog =============================== */
.rd-nextturn { margin: 0 auto 0 0; font-size: var(--fs-sm); line-height: 1.3; color: var(--p-muted); }
.rd-nextturn b { color: var(--p-ink); }

/* ============================ rules: the two modes ======================= */
.rule-pick--all .pw { opacity: 1; }
.rule-turn .pw:not(.is-pick) { opacity: 0.5; }
.rule__mode { min-width: 0; }

/* ============================ small screens ============================== */
@media (max-width: 959px) and (min-height: 521px) {
  /* the move bar is fixed to the bottom: keep the banner to one slim row so it never eats the clue */
  .turn { padding: 0.25rem 0.4rem 0.25rem 0.55rem; gap: 0 0.6rem; }
  .turn__name { font-size: 1.15rem; }
  .turn__pass { min-height: 2.75rem; }
  .zone-actions[data-mode='classic'] .play-hint__lead { display: none; }
  .zone-actions[data-mode='classic'] .play-hint { min-height: 0; }
}
@media (max-width: 400px) {
  .turn__kicker { letter-spacing: 0.12em; }
  .turn__pass { padding-inline: 0.8em; letter-spacing: 0.06em; }
}
@media (prefers-reduced-motion: reduce) {
  .turn.is-swap { animation: none; }
  .score-row { transition: none; }
  .score-row.is-turn { transform: none; }
}
