/* Agency: TCG — visual polish. Keep game rules and tabletop geometry intact. */

/* Draw interface marks, rather than relying on a font's baseline/bearings. */
.ui-icon { display: block; flex: none; pointer-events: none; }
.modal-x {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  z-index: 2;
}
.meeting-note-reaction-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 0;
}
.game-modal:has(> .modal-x) > h2,
.rules-modal-content > h2,
.discard-browser-content > h2 { padding-right: 42px; }
body.game-overlay-open { overflow: hidden; }
.game-overlay { grid-template-columns: minmax(0, 1fr); }
.game-modal { min-width: 0; width: min(980px, 100%); overscroll-behavior: contain; }
.discard-browser-modal { width: min(1240px, 100%); }

/* Rules: the old dark-theme list color survived the switch to light panels. */
.rules-modal { width: min(820px, 100%); max-width: 100%; }
.rules-modal-content > h2 { line-height: 1.08; }
.rules-section { border-color: rgba(23,21,18,.17); padding-block: 22px; }
.rules-section h3 { font-size: .875rem; line-height: 1.4; }
.rules-modal .rules-section p,
.rules-modal .rules-section li {
  color: #514b46 !important;
  font-size: 1rem;
  line-height: 1.65;
}
.rules-section p + p { margin-top: 12px; }
.rules-section li + li { margin-top: 8px; }
.rules-section li::marker { color: #514b46; }

/* A stable header avoids a layout jump while the logo image loads. */
.site-redesign-130 .online-logo { aspect-ratio: 2095 / 1534; object-fit: contain; }
.site-redesign-130 .online-panel { width: min(1180px, 100%); }
.site-redesign-130 .online-head { flex-wrap: wrap; }
.site-redesign-130 .alpha-chip { max-width: 100%; white-space: normal; line-height: 1.45; }
.site-redesign-130 .solo-mode-card,
.site-redesign-130 .solo-mode-controls,
.site-redesign-130 .selection-grid > *,
.site-redesign-130 .field { min-width: 0; }
.site-redesign-130 .field label { font-size: .75rem; line-height: 1.4; }
.site-redesign-130 .field input:not([type="radio"]),
.site-redesign-130 .field select { min-height: 46px; font-size: 1rem; }
.site-redesign-130 .mode-card p,
.site-redesign-130 .solo-mode-copy p,
.site-redesign-130 .home-rules-card p { font-size: .875rem; line-height: 1.55; }
.site-redesign-130 .multi-bot-setup-note,
.site-redesign-130 .agency-name-count-331 { font-size: .75rem; line-height: 1.45; color: #655f59; }
.site-redesign-130 .agency-name-count-331 { margin-top: 0; font-variant-numeric: tabular-nums; }
.site-redesign-130 .setup-back { min-height: 40px; font-size: .75rem; }
.site-redesign-130 :is(.primary-btn, .secondary-btn) {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  line-height: 1.25;
}
.site-redesign-130 .solo-difficulty-option span { text-align: center; }
.site-redesign-130 .solo-difficulty-option input:focus-visible + span {
  outline: 2px solid #171512;
  outline-offset: 3px;
}
.site-redesign-130 :is(button, input, select):focus-visible,
.game-modal :is(button, input, select):focus-visible,
.match-redesign-130 button:focus-visible {
  outline: 2px solid #171512;
  outline-offset: 3px;
}

/* Align counterpart fields and actions even when names have a counter. */
@media (min-width: 761px) {
  .site-redesign-130 .setup-primary-grid .mode-card {
    display: grid;
    grid-template-rows: auto auto minmax(3.1em, auto) auto 1fr auto;
    align-content: start;
  }
  .site-redesign-130 .setup-primary-grid .field { align-content: start; padding-bottom: 25px; position: relative; }
  .site-redesign-130 .setup-primary-grid .agency-name-count-331 { position: absolute; right: 0; bottom: 0; }
  .site-redesign-130 .setup-primary-grid .action-row { align-self: end; }
}

/* Keep the three home tiles on a common typographic grid. */
@media (min-width: 901px) {
  .game-mode-choice-grid .game-mode-choice {
    display: grid;
    grid-template-rows: auto 124px minmax(54px, auto) minmax(34px, auto);
    align-content: start;
    align-items: end;
  }
  .game-mode-choice-grid .game-mode-choice-kicker { align-self: start; margin-bottom: 0; }
  .game-mode-choice-grid .game-mode-choice > strong { margin-top: 24px; }
  .game-mode-choice-grid .game-mode-choice > span:not(.game-mode-choice-kicker),
  .game-mode-choice-grid .game-mode-choice > em { align-self: start; }
}
.game-mode-choice em { font-size: .75rem; line-height: 1.45; }
.leaderboard-name-33 { font-size: .8125rem; }
.leaderboard-rank-33 { font-size: .75rem; color: #aaa9a2; }
.leaderboard-score-33 { font-variant-numeric: tabular-nums; }
.leaderboard-score-33 small { font-size: .625rem; color: #aaa9a2; }
.leaderboard-heading-33 > span { font-size: .625rem; color: #aaa9a2; }

/* Give enlarged Campaign titles their full column; never split ordinary words. */
.presentation-viewer-modal {
  display: block;
  overflow: auto !important;
}
.presentation-viewer-content { min-height: 100%; grid-template-rows: auto 1fr auto; }
.presentation-viewer-modal .network-slot.campaign-stack {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  gap: 18px;
}
.presentation-viewer-modal .campaign-stack-info .stack-label {
  font-size: 1rem;
  line-height: 1.3;
  word-break: normal;
  overflow-wrap: break-word;
}
.presentation-viewer-modal .stack-cards { width: 180px; max-width: 100%; }
.presentation-viewer-modal .stack-card { width: 180px; max-width: 100%; }
.presentation-viewer-modal .network-slot { min-height: 440px; }
.presentation-viewer-meta { font-size: .8125rem; line-height: 1.5; }
.presentation-viewer-note { font-size: .75rem; line-height: 1.5; }
.presentation-viewer-score { align-self: flex-start; }
.presentation-viewer-header h2 { overflow-wrap: anywhere; line-height: 1.08; }
.presentation-viewer-header > div:first-child { min-width: 0; }

@media (max-width: 860px) {
  .site-redesign-130 .solo-mode-card { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .site-redesign-130 { padding-inline: 16px; }
  .site-redesign-130 .online-head,
  .site-redesign-130 .online-body { padding-inline: 0; }
  .site-redesign-130 .home-rules-card { align-items: flex-start; flex-direction: column; }
  .site-redesign-130 .home-rules-card .secondary-btn { align-self: stretch; }
  .site-redesign-130 .alpha-chip { font-size: .625rem; }
  .game-overlay { padding: 16px; }
  .game-modal { max-width: 100%; max-height: calc(100dvh - 32px); }
  .rules-modal { padding: 24px 20px 28px; }
  .rules-modal-content > h2 { font-size: 1.75rem; }
  .presentation-viewer-modal .network-slot { min-height: 440px; }
  .presentation-viewer-header { gap: 16px; }
  .presentation-viewer-score { justify-self: start; }
}
@media (prefers-reduced-motion: reduce) {
  .game-mode-choice { transition: none; }
  .game-mode-choice:hover { transform: none; }
}
