/* The Gathering page (client/js/ui/gathering.js, events rework phase 4).
   One column; the faces wrap. */

.gathering-picker { width: 100%; margin-bottom: 0.5rem; }

.gathering-head { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.6rem; }
.gathering-head-img { width: 3.5rem; height: 3.5rem; border-radius: 50%; object-fit: cover; flex: none; border: 1px solid var(--accent-gold); }
.gathering-head-text { min-width: 0; }
.gathering-title { font-family: var(--font-display); font-variant: small-caps; font-weight: 700; font-size: 1.1rem; color: var(--text-primary); overflow-wrap: anywhere; }
.gathering-sub { font-size: 0.72rem; color: var(--text-muted); }

.gathering-block { margin-bottom: 0.6rem; }
.gathering-day { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.gathering-day > div { flex-basis: 100%; }

.gathering-faces { display: grid; grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr)); gap: 0.5rem; }
.gathering-face { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; background: none; border: 1px solid var(--border-dim); border-radius: 6px; padding: 0.4rem 0.3rem; cursor: pointer; color: inherit; min-width: 0; }
.gathering-face:hover { border-color: var(--accent-gold); }
/* A portrait, not a token (maggie, 2026-09-17): the card's width, three by four. */
.gathering-face-img { width: 100%; aspect-ratio: 3 / 4; height: auto; border-radius: 4px; object-fit: cover; }
.gathering-face-blank { display: flex; align-items: center; justify-content: center; background: var(--bg-surface); color: var(--text-muted); font-family: var(--font-display); font-size: 1.6rem; }
.gathering-face-name { font-size: 0.72rem; color: var(--text-primary); text-align: center; overflow-wrap: anywhere; }
.gathering-face-what { font-size: 0.72rem; color: var(--text-muted); text-align: center; overflow-wrap: anywhere; }

.gathering-feed { font-size: 0.72rem; color: var(--text-secondary); line-height: 1.5; max-height: 20rem; overflow-y: auto; }
.gathering-empty { font-style: italic; color: var(--text-muted); }

/* The tourney programme (events rework phase 5). The bracket scrolls inside its own box. */
/* A contest is a wrapping row, not a column (2026-09-15): the name and its one
   button (Enter, the tactic, Withdraw) share a line, and every block under them
   - the bracket, the standings, the pot - takes a line of its own. As a column,
   seven contests each spent a full line on a lone Enter under their name. */
.gathering-contest { border-top: 1px solid var(--border-dim); padding: 0.55rem 0; display: flex; flex-flow: row wrap; align-items: center; gap: 0.4rem 0.5rem; }
.gathering-contest:first-child { border-top: none; padding-top: 0.1rem; }
.gathering-contest > * { flex: 1 1 100%; min-width: 0; }
.gathering-contest > .gathering-contest-name { flex: 1 1 8rem; }
.gathering-contest > .btn, .gathering-contest > select { flex: 0 0 auto; max-width: 100%; }
.gathering-contest-name { font-family: var(--font-display); font-variant: small-caps; font-size: 1rem; color: var(--accent-gold); }
/* Rows carried no size of their own, so a jackpot line or a plot's description
   came out at body size, a step louder than the names and standings around it. */
.gathering-row { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; font-size: 0.8rem; line-height: 1.45; color: var(--text-secondary); }
/* An amount and the button that spends it wrap as one, so Sponsor never lands on
   a line below its own box. */
.gathering-pair { display: inline-flex; align-items: center; gap: 0.35rem; }
.gathering-num { width: 5.5rem; }
/* The fold headings: the caret at the far edge, and a thumb-sized row on touch. */
.gathering-block > .panel-card-title { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
@media (pointer: coarse) {
  .gathering-block > .panel-card-title { min-height: 44px; margin-top: -0.4rem; }
}
.gathering-bracket { display: flex; gap: 0.75rem; overflow-x: auto; padding-bottom: 0.25rem; }
.gathering-round { display: flex; flex-direction: column; justify-content: space-around; gap: 0.3rem; min-width: 10rem; }
.gathering-match { font-size: 0.72rem; border: 1px solid var(--border-dim); border-radius: 4px; padding: 0.2rem 0.35rem; color: var(--text-secondary); }
.gathering-won { color: var(--text-primary); font-weight: 600; }
.gathering-standing { font-size: 0.74rem; color: var(--text-secondary); display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.gathering-out { color: var(--text-muted); }   /* was opacity 0.55: 2.4:1 */
.gathering-odds { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.66rem; color: var(--text-muted); }
.gathering-odds .bar-track { width: 4rem; }
.gathering-places { font-size: 0.72rem; color: var(--accent-gold); }
.gathering-ask { font-size: 0.78rem; display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; margin-bottom: 0.4rem; }
/* THE PLOTS AT A GATHERING, THREE ACROSS (maggie, 2026-09-16). auto-fit with a
   14rem floor rather than a hard three: it gives three where there is room for
   three, two where there is not, and one on a phone, without a breakpoint for
   each. The cards stretch so a short plot and a long one in the same row still
   line their Begin buttons up.

   align-content:start on the card so the button sits under the text rather
   than floating in the middle of a tall cell. */
.gathering-intrigues {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0.6rem;
}
.gathering-intrigue {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  border: 1px solid var(--border-dim);
  border-radius: 6px;
  padding: 0.55rem 0.6rem;
  min-width: 0;
}
.gathering-intrigue .gathering-contest-name { font-size: 0.95rem; }
.gathering-intrigue-desc { font-size: 0.74rem; color: var(--text-muted); flex: 1; }
/* The picker and Begin on one line, and the picker gives way first. */
.gathering-intrigue-act { gap: 0.35rem; align-items: center; }
.gathering-intrigue-act select { flex: 1 1 6rem; min-width: 0; }

.hof-confirm-body select { width: 100%; margin-top: 0.5rem; }

/* The tombola and the block beside it (ui/gathering.js, 2026-09-17): side by side
   where there is room, stacked on a phone. */
.gathering-duo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 0 0.6rem;
  align-items: start;
}
