/* GM Sports interface. This stylesheet is intentionally loaded after the legacy
   screens so shared controls and existing routes use the same design system. */
:root {
  --bg: var(--surface-bg);
  --panel: var(--surface-panel);
  --panel-2: var(--surface-card);
  --line: var(--surface-border);
  --accent: var(--color-accent);
  --accent-light: var(--color-accent-light);
  --accent-ink: var(--color-accent-ink);
  --good: var(--color-pos);
  --bad: var(--color-neg);
  --bad-text: var(--color-neg-text);
  --warn: var(--color-warn);
  --radius: var(--radius-lg);
  --shadow: var(--shadow-lg);
  --modern-edge: var(--surface-border-strong);
  --modern-shadow: var(--shadow-md);
  --menu-wood: #4a3520;
  --menu-wood-hi: #5a4227;
  --menu-edge: #a8843f;
  --menu-ink: #f6e7c8;
}
.modern-shell {
  max-width: 1920px;
  padding: var(--space-4) var(--space-8) var(--space-8);
  gap: var(--space-4);
}
.modern-shell header.topbar {
  min-height: 56px;
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--modern-edge);
  border-radius: 12px;
  background: var(--bg);
  box-shadow: var(--modern-shadow);
}
.modern-shell .club-identity { min-width: 0; gap: var(--space-3); }
.modern-shell .topbar-left .brand { flex: none; }
.modern-shell .club-details { min-width: 0; }
.modern-shell .club-details .club { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modern-shell .club-chips { gap: var(--space-2); }
.modern-shell .club-chips .chip { padding: var(--space-1) var(--space-2); border-color: var(--modern-edge); }
.modern-shell .user-links { gap: var(--space-3); }
.modern-shell .user-links a { display: inline-flex; align-items: center; min-height: 44px; }
.modern-shell .mainmenu {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-2);
  padding: var(--space-1);
  border: 1px solid var(--modern-edge);
  border-radius: 12px;
  background: var(--bg);
  box-shadow: none;
  z-index: 20;
}
.modern-shell .menu-logo { display: none; }
.modern-shell .menu-tile,
.modern-shell .menu-group.current .menu-tile {
  display: flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 48px; padding: var(--space-1) var(--space-3);
  border: 1px solid transparent; border-radius: 8px;
  background: transparent; box-shadow: none; text-shadow: none;
  transition: transform 120ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.modern-shell .menu-group.current .menu-tile { background: var(--row-hl); border-color: var(--accent); }
.modern-shell .menu-tile:hover { background: var(--panel-2); transform: none; filter: none; }
.modern-shell .menu-tile:active { transform: scale(0.97); }
.modern-shell .menu-tile img { width: 32px; height: 32px; margin: 0; filter: none; }
.modern-shell .menu-title { font-size: var(--text-sm); text-shadow: none; }
.modern-shell .caret { display: inline; }
.modern-shell .tile-count { display: inline-block; right: -8px; }
.modern-shell .tile-count[hidden] { display: none; }
.modern-shell .menu-list,
.modern-shell .menu-group.current .menu-list { display: none; }
.modern-shell .menu-group.open .menu-list {
  display: grid; position: absolute; top: calc(100% + 8px); left: 0; right: auto;
  width: 256px; min-width: 0; max-width: calc(100vw - 32px); max-height: min(70dvh, 480px); overflow-y: auto;
  margin: 0; padding: var(--space-2); background: var(--bg);
  border: 1px solid var(--modern-edge); border-radius: 12px; box-shadow: var(--modern-shadow);
}
.modern-shell .menu-group:nth-child(n+4).open .menu-list { left: auto; right: 0; }
.modern-shell .menu-list li { padding: 0; text-indent: 0; }
.modern-shell .menu-list li::before { content: none; }
.modern-shell .menu-list a,
.modern-shell .menu-group.current .menu-list a,
.modern-shell .menu-group.open .menu-list a {
  display: flex; align-items: center; min-height: 44px; padding: var(--space-2) var(--space-3);
  border-radius: 8px; color: var(--text); text-shadow: none;
}
.modern-shell .menu-list a:hover { background: var(--panel-2); text-decoration: none; }
.modern-shell .menu-list a.active { background: var(--row-hl); box-shadow: inset 3px 0 var(--accent); }
.modern-shell .board { background: var(--panel); border: 1px solid var(--modern-edge); border-radius: 16px; box-shadow: var(--modern-shadow); padding: var(--space-6); }
.modern-shell .main > h1:first-child { margin-bottom: var(--space-6); }
.modern-shell .site-footer { padding-block: var(--space-4); }



/* Persistent filter labels need their own track after the transfer-desk integration. */
.gm-filter-panel .field { flex: 1 1 128px; min-width: 0; max-width: min(100%, 22rem); margin: 0; }
.gm-filter-panel .field > span { display: block; font-size: var(--text-xs); color: var(--gm-muted); }
.gm-filter-panel .field :is(input, select) { width: 100%; min-width: 0; height: 44px; min-height: 44px; box-sizing: border-box; font-size: var(--text-base); line-height: 1.2; }
.gm-filter-panel .field > span { margin-bottom: 4px; }
.gm-filter-panel:has(> .field) { align-items: end; }
/* The scouting filters: the heading on its own row, so the six fields share the full width and their texts ("Todas as posições") fit. */
.gm-scout-filters { flex-wrap: wrap; grid-template-columns: minmax(0, 1fr); }   /* (phones: the panel is a grid, heading above the fields) */
.gm-scout-filters > .gm-results-heading { flex: 1 1 100%; }
.gm-scout-filters > .market-filters { flex: 1 1 100%; }
@media (max-width: 520px) { .gm-scout-filters .field:has(> select) { flex: 1 1 100%; } }   /* a phone: the two comboboxes get a whole row, so "Todas as posições" fits */
.gm-metric-label { white-space: normal; }

@media (max-width: 1100px) {
  .modern-shell { padding-inline: var(--space-4); }
}
@media (max-width: 760px) {
  .modern-shell { padding: var(--space-2) var(--space-2) calc(96px + env(safe-area-inset-bottom)); gap: var(--space-3); }
  .modern-shell .mainmenu { position: fixed; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); z-index: 40; }
  /* The bar: light wood with a gold edge, big touch targets (64 px), 34 px icons and 13 px labels. */
  .modern-shell .mainmenu { gap: var(--space-1); padding: var(--space-1); background: var(--menu-wood); border: 1px solid var(--menu-edge); border-radius: 16px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55); }
  .modern-shell .menu-tile, .modern-shell .menu-group.current .menu-tile { position: relative; flex-direction: column; gap: 2px; min-height: 64px; padding: var(--space-1); border-radius: 12px; color: var(--menu-ink); }
  .modern-shell .menu-tile:hover { background: var(--menu-wood-hi); }
  .modern-shell .menu-tile img { width: 34px; height: 34px; }
  .modern-shell .menu-title { position: static; font-size: var(--text-xs); line-height: 1.15; color: var(--menu-ink); }
  .modern-shell .caret { display: none; }
  /* The current section and the one that is open: the painted tile texture under a dark wash (text stays above 5:1) and a gold edge. */
  .modern-shell .menu-group.current .menu-tile, .modern-shell .menu-group.open .menu-tile {
    background: linear-gradient(rgba(58, 38, 16, 0.66), rgba(58, 38, 16, 0.66)), url("/assets/tex-tile-active.jpg") center / cover; border-color: var(--accent); }
  .modern-shell .menu-group.current .menu-title, .modern-shell .menu-group.open .menu-title { color: #fff6dc; }
  .modern-shell .tile-count { top: 2px; right: 6px; }
  /* The open list: a sheet above the bar, as wide as the bar (anchored to it, not to the tile), rounded, edged and shadowed against the page. */
  .modern-shell .menu-group { position: static; }
  .modern-shell .menu-group:nth-child(n).open .menu-list {
    top: auto; bottom: calc(100% + 12px); left: 0; right: 0; width: auto; max-width: none; gap: 2px; padding: var(--space-2);
    background: var(--menu-wood); border: 1px solid var(--menu-edge); border-radius: 16px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4), 0 -4px 12px rgba(0, 0, 0, 0.35), 0 14px 36px rgba(0, 0, 0, 0.6); }
  .modern-shell .menu-group.open .menu-list a { min-height: 52px; padding: 12px 20px; border-radius: 10px; font-size: var(--text-base); line-height: 1.3; color: var(--menu-ink); }
  .modern-shell .menu-group.open .menu-list a:hover { background: var(--menu-wood-hi); }
  .modern-shell .menu-group.open .menu-list a.active {
    background: linear-gradient(rgba(58, 38, 16, 0.66), rgba(58, 38, 16, 0.66)), url("/assets/tex-tile-active.jpg") center / cover; box-shadow: inset 4px 0 var(--accent); color: #fff6dc; font-weight: 700; }
  .modern-shell .board { padding: var(--space-4); }
  .modern-shell header.topbar { gap: var(--space-2); padding: var(--space-2); }
  .modern-shell .club-identity { flex: 1 1 0; }   /* the logo and the club share the first row; the name is cut with an ellipsis, never wrapped */
  .modern-shell .topbar-actions { width: 100%; justify-content: space-between; flex-wrap: wrap; }
  .modern-shell .user-links { flex-wrap: wrap; gap: var(--space-2); }
}
@media (prefers-reduced-motion: reduce) {
  .modern-shell .menu-tile { transition: none; }
}

/* Lightweight game feedback, without layout shifts or blocking navigation. */
@keyframes gm-arrive { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
@keyframes gm-pop { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: no-preference) {
  .modern-shell .board > .main > :is(.dashboard, .gm-view, .card, section) { animation: gm-arrive 190ms ease-out both; }
  .modern-shell .menu-group.open .menu-list { animation: gm-pop 140ms ease-out both; }
  }


/* Rating glyphs have intrinsic width even when a table is horizontally scrollable. */
.stars { display: inline-flex; align-items: center; width: max-content; max-width: none; letter-spacing: 0; line-height: 1; vertical-align: middle; }
.stars > span { flex: 0 0 auto; }
.stars .half { margin-right: 0; }
.dash-squad .table-wrap { overflow-x: auto; }
@media (max-width: 760px) {
  .dash-squad table { width: 100%; min-width: 0; table-layout: fixed; }
  .dash-squad :is(th, td):nth-child(n+4) { display: none; }
  .dash-squad :is(th, td) { padding: 9px 5px; }
  .dash-squad :is(th, td):first-child { width: 50%; min-width: 0; text-align: left; }
  .dash-squad :is(th, td):nth-child(2) { width: 18%; }
  .dash-squad :is(th, td):nth-child(3) { width: 32%; white-space: nowrap; }
  .dash-squad td:first-child .person { display: flex; width: 100%; }
  .dash-squad td:first-child .person a { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .dash-squad td:nth-child(2) .pos { min-width: 0; padding-inline: 4px; font-size: var(--text-xs); }
  .dash-squad .stars { font-size: clamp(0.65rem, 2.8vw, 0.85rem); }
  .squad-table .stars { font-size: 0.82em; }
}

/* Stadium at night: dark, crisp surfaces with a single vivid action colour. */
html { background: var(--bg); scroll-padding-top: 1rem; }
/* The painting and its fade live in one fixed layer (see styles.css, body::before), so the page itself only needs the
   base colour: it goes on to the end of the page, however long it is. */
body {
  color: var(--text);
  background-color: var(--bg);
  overflow-x: clip;
}
::selection { color: var(--accent-ink); background: var(--accent); }
h1, h2, h3 { letter-spacing: -0.025em; }
h1 { font-weight: 790; }
h2 { font-weight: 740; }
h3 { font-weight: 720; }
a { color: var(--accent-light); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
.muted { color: var(--muted); }
.modern-shell {
  width: min(100%, 1660px);
  padding: clamp(12px, 1.7vw, 28px) clamp(12px, 2.1vw, 36px) 32px;
  gap: 14px;
}
.modern-shell header.topbar {
  border: 1px solid var(--modern-edge);
  border-radius: 18px;
  background: linear-gradient(125deg, #182b39, #101c2a 58%, #122333);
  box-shadow: var(--modern-shadow);
  padding: 12px clamp(12px, 1.8vw, 28px);
  gap: 12px 18px;
  min-width: 0;
}
.modern-shell .club-identity { gap: 12px; }
.modern-shell .club-identity .brand {
  border-right: 1px solid var(--modern-edge);
  padding-right: 14px;
}
.modern-shell header.topbar .club {
  font-size: clamp(1rem, 0.92rem + 0.35vw, 1.3rem);
  color: var(--text);
  letter-spacing: -0.03em;
}
.modern-shell .club-chips .chip {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  border: 1px solid #365161;
  border-radius: 10px;
  padding: 6px 10px;
  background: rgba(4, 15, 26, 0.38);
  color: var(--muted);
  font-size: var(--text-xs);
  line-height: 1.45;
}
.modern-shell .club-chips .chip b { color: var(--accent-light); font-weight: 800; }
.modern-shell .user-links a {
  border: 1px solid transparent;
  padding: 6px 9px;
  border-radius: 9px;
  color: var(--muted);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 650;
}
.modern-shell .user-links a:is(:hover, .active) {
  color: var(--text);
  background: #294252;
  border-color: #38596a;
}
.modern-shell .search { min-width: 0; }
.modern-shell .search input {
  min-height: 46px;
  padding: 10px 14px;
  border-radius: 11px;
  background: #0b1725;
  border-color: #395365;
}
.modern-shell .search-results {
  background: #152536;
  border-color: var(--modern-edge);
  border-radius: 12px;
  box-shadow: var(--modern-shadow);
}
.modern-shell .search-option { min-height: 48px; }
.modern-shell .search-option:is(:hover, .active) {
  background: #2b4855;
  outline-color: var(--accent);
}
@media (min-width: 1100px) {
  .modern-shell header.topbar {
    grid-template-columns: minmax(0, 1.1fr) minmax(12rem, 19rem) minmax(0, 1.4fr);
  }
}
.modern-shell .mainmenu {
  margin: 0;
  padding: 6px;
  gap: 6px;
  border: 1px solid var(--modern-edge);
  border-radius: 16px;
  background: #142331;
  box-shadow: var(--modern-shadow);
}
.modern-shell .menu-tile,
.modern-shell .menu-group.current .menu-tile {
  position: relative;
  min-height: 64px;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: 11px;
  padding: 10px 12px;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  text-shadow: none;
}
.modern-shell .menu-tile:is(:hover, :focus-visible) {
  color: var(--text);
  background: #25394a;
}
.modern-shell .menu-group.current .menu-tile,
.modern-shell .menu-group.open .menu-tile {
  color: var(--accent-light);
  border-color: #40604a;
  background: linear-gradient(130deg, #284633, #1b3b40);
}
.modern-shell .menu-group.current .menu-tile::after {
  content: '';
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--accent);
}
.modern-shell .menu-tile img { width: 36px; height: 36px; object-fit: contain; }
.modern-shell .menu-title {
  font-size: var(--text-md);
  font-weight: 780;
  line-height: 1.2;
  letter-spacing: -0.012em;
}
.modern-shell .caret { color: var(--accent); }
.modern-shell .tile-count { right: 4px; top: 2px; }
.modern-shell .menu-group.open .menu-list {
  width: max(260px, 100%);
  max-width: calc(100vw - 28px);
  padding: 8px;
  border: 1px solid #41596a;
  border-radius: 14px;
  background: #1a2b3b;
  box-shadow: 0 22px 54px rgba(0, 6, 14, 0.52);
}
.modern-shell .menu-list a,
.modern-shell .menu-group.current .menu-list a,
.modern-shell .menu-group.open .menu-list a {
  color: var(--text);
  padding: 11px 13px;
  border-radius: 9px;
  line-height: 1.3;
  overflow-wrap: anywhere;
  font-size: var(--text-md);
}
.modern-shell .menu-list a:is(:hover, :focus-visible) { background: #2b4555; color: white; }
.modern-shell .menu-list a.active {
  background: #263e3b;
  color: var(--accent-light);
  box-shadow: inset 3px 0 0 var(--accent);
}
.modern-shell .board {
  padding: clamp(16px, 2.5vw, 36px);
  background: linear-gradient(158deg, rgba(21, 36, 51, 0.95), rgba(12, 23, 35, 0.98));
  border: 1px solid var(--modern-edge);
  border-radius: 20px;
  box-shadow: var(--modern-shadow);
}
.modern-shell .main { min-width: 0; }
.modern-shell .main > h1:first-child,
.modern-shell .main > .gm-view > h1:first-child {
  margin-bottom: clamp(16px, 2vw, 28px);
  font-size: clamp(1.6rem, 1.2rem + 1.9vw, 2.8rem);
  color: var(--text);
  letter-spacing: -0.045em;
}
.card, .gm-data-panel, .gm-filter-panel {
  border: 1px solid var(--modern-edge);
  border-radius: 16px;
  background: linear-gradient(150deg, #192b3c, #122130);
  box-shadow: 0 4px 18px rgba(0, 6, 12, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.045);
}
.card { padding: clamp(14px, 1.6vw, 24px); }
.card > .topbar { margin-bottom: 16px; align-items: baseline; gap: 8px 12px; }
.card > .topbar h2 { margin: 0; font-size: clamp(1.1rem, 1rem + 0.65vw, 1.55rem); }
.badge, .chip {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: #263949;
}
.badge.good { border-color: #31675c; color: #9be9c4; background: #193a36; }
.badge.bad { border-color: #85535c; color: #ffb2bb; background: #472c39; }
.badge.warn { border-color: #80643e; color: #ffcf7b; background: #473b30; }
input, select, textarea {
  background: #0e1c2a;
  border: 1px solid #3a5366;
  color: var(--text);
  border-radius: 10px;
  min-width: 0;
}
input::placeholder, textarea::placeholder { color: #a0b3c0; }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--accent); }
.tabs button, .tabs a.tab, .gm-view .tabs button, .gm-view .tabs a.tab {
  min-height: 44px;
  background: #1c3040;
  border: 1px solid #375164;
  border-radius: 10px;
  color: var(--muted);
  padding: 9px 14px;
  font-size: var(--text-md);
  font-weight: 740;
  text-shadow: none;
}
.tabs :is(button, a.tab).active, .gm-view .tabs :is(button, a.tab).active {
  background: #2a4638;
  border-color: #608957;
  color: var(--accent-light);
  box-shadow: inset 0 0 0 1px rgba(184, 243, 75, 0.1);
}
.tabs :is(button, a.tab):hover { border-color: var(--accent); color: var(--text); }
.table-wrap, .gm-view .table-wrap {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  border: 1px solid #30485a;
  border-radius: 12px;
  background: #10202f;
  scrollbar-color: #507080 #122332;
}
th, .gm-view th {
  background: #203748;
  color: #c3d6df;
  border-bottom: 1px solid #385163;
  font-size: var(--text-xs);
  font-weight: 780;
  letter-spacing: 0.03em;
}
td, .gm-view td { border-bottom: 1px solid #294051; }
tbody tr:nth-child(odd) td { background: var(--row); }
tbody tr:nth-child(even) td { background: var(--row-2); }
tbody tr:hover td, .gm-view tbody tr:hover td { background: #294353; }
tbody tr.me td { background: var(--row-hl); }
tbody tr.me td:first-child { box-shadow: inset 3px 0 var(--accent); }
.site-footer, .modern-shell .site-footer {
  border-radius: 12px;
  background: #122231;
  border: 1px solid #2d4657;
  padding: 8px 14px;
  color: var(--muted);
  font-size: var(--text-xs);
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }

/* The social networks in the footer of every page inside the game and in the phone menu (social-links.mjs): the sign-in screen's
   icons, one size down, so the footer's line keeps its height and the three fit beside Manual and Privacy. */
.footer-social { display: flex; align-items: center; gap: 6px; }
.footer-social .auth-social-icon { width: 26px; height: 26px; border-radius: 8px; background: rgba(6, 25, 37, .4); }
.footer-social .auth-social-symbol, .footer-social .auth-social-symbol svg { width: 13px; height: 13px; }
.stadium-more-settings .footer-social { flex-wrap: wrap; gap: 8px; margin-top: 6px; }

/* Football operations dashboard. */
.dashboard { gap: clamp(12px, 1.3vw, 20px); }
.dashboard > .dash-matchday {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 360px;
  padding: clamp(20px, 3vw, 42px);
  border: 1px solid #506f5a;
  border-radius: 18px;
  background: linear-gradient(100deg, #102731 0%, rgba(13, 38, 39, 0.94) 38%, rgba(8, 22, 30, 0.67) 100%),
    url('/assets/estadio-ilustrado.jpg') center 48% / cover;
  box-shadow: inset 4px 0 0 var(--accent), 0 12px 32px rgba(0, 0, 0, 0.17);
}
.dashboard .next-match-head { gap: 10px; margin-bottom: 20px; }
.dashboard .next-match-head h2 {
  flex: 1 1 100%;
  font-size: clamp(1.4rem, 1.05rem + 1.5vw, 2.15rem);
  font-weight: 820;
  letter-spacing: -0.04em;
}
.dashboard .next-match-head .badge {
  border-color: #5d7957;
  background: rgba(16, 47, 36, 0.88);
  color: var(--accent-light);
  font-weight: 800;
}
.dashboard .next-match-head .muted { font-size: var(--text-sm); }
.dashboard .next-match-when {
  border: 1px solid #4b7563;
  border-radius: 9px;
  padding: 6px 12px;
  background: rgba(9, 28, 32, 0.85);
  color: #e4f5ef;
  font-size: var(--text-sm);
}
.dashboard .next-match-teams { padding: 18px 0 24px; gap: clamp(8px, 2vw, 28px); }
.dashboard .next-team {
  min-width: 0;
  font-size: clamp(1rem, 0.7rem + 1.1vw, 1.65rem);
  font-weight: 820;
  line-height: 1.3;
}
.dashboard .next-team .team-with-crest { gap: 12px; }
.dashboard .next-team .muted { color: #c1d0d6; }
.dashboard .next-vs {
  align-self: center;
  border: 1px solid #54736b;
  background: #173c3b;
  color: var(--accent-light);
  font-size: var(--text-md);
  font-weight: 900;
  letter-spacing: 0.08em;
  border-radius: 50%;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
}
.dashboard .next-match-actions { justify-content: flex-start; }
.dashboard > .dash-metrics { gap: 12px; }
.dashboard .stat-card {
  position: relative;
  overflow: hidden;
  padding: 18px 20px;
  border-radius: 15px;
  border-color: #355063;
}
.dashboard .stat-card::before {
  content: '';
  position: absolute;
  top: 16px;
  bottom: 16px;
  left: 0;
  width: 3px;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}
.dashboard .stat-card:nth-child(2)::before { background: var(--pos-def); }
.dashboard .stat-card:nth-child(3)::before { background: var(--color-warn); }
.dashboard .stat-header { gap: 10px; }
.dashboard .stat-header h3 {
  color: #c7d9e0;
  font-size: var(--text-xs);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.dashboard .stat { color: var(--text); font-size: clamp(1.65rem, 1.2rem + 1.5vw, 2.4rem); letter-spacing: -0.05em; }
.dashboard .stat small { color: var(--muted); font-size: var(--text-xs); letter-spacing: normal; }
.dashboard .stat-footer { font-size: var(--text-xs); line-height: 1.45; }
.dashboard .dash-news, .dashboard .dash-squad, .dashboard .dash-matches > .card { border-radius: 16px; }
.dashboard .news-item {
  border-bottom: 1px solid #2b4455;
  border-radius: 0;
  padding: 12px 8px;
}
.dashboard .news-item:last-child { border-bottom: 0; }
.dashboard .result-row {
  border: 1px solid #2e4858;
  border-radius: 10px;
  background: #102130;
  min-height: 60px;
  padding: 10px;
}
.dashboard .result-row:hover { border-color: #507489; background: #1c3444; }
/* The rows are a table: one column as wide as the card (never as wide as its content) and the same inner columns in every row, so every row has exactly the same width and the badges
   and the matchups (names, crests and score around one centre) line up from row to row. Played: result · competition · matchup; upcoming: round · matchup. On a phone the matchup
   takes a line of its own under the badges. */
/* A small inset on both sides of the two lists (the same in both cards, so the rows keep one width): the rows no longer touch the inner edge of the card. The hover/focus highlight is on the row itself, so it stays inside the inset. */
.dashboard .results { --results-inset: 2px; grid-template-columns: minmax(0, 1fr); padding-inline: var(--results-inset); }
.dashboard .results .result-row { box-sizing: border-box; width: 100%; min-width: 0; }
.dashboard .results.played .result-row { display: grid; grid-template-columns: 1.75rem 5.5rem minmax(0, 1fr); column-gap: 10px; }
/* Upcoming uses the SAME three columns as played, the round badge spanning the first two (result + competition), so the matchup starts at the same x in both cards and the score / x sit on one vertical axis. */
.dashboard .results.upcoming .result-row { display: grid; grid-template-columns: 1.75rem 5.5rem minmax(0, 1fr); column-gap: 10px; }
.dashboard .results.upcoming .result-row > .round-when { grid-column: 1 / 3; }
.dashboard .result-row > .badge { justify-self: start; }
/* Round badge and kickoff: side by side when they fit, the date under the badge when the column is narrow (desktop); rows of both cards keep one height so the two lists line up. */
.round-when { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.round-kickoff { font-size: var(--text-xs); color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dashboard .results .result-row { min-height: 84px; }
.dashboard .result-teams { min-width: 0; }
@media (max-width: 640px) {
  .dashboard .results.played .result-row { grid-template-columns: auto auto minmax(0, 1fr); }
  .dashboard .results.upcoming .result-row { grid-template-columns: auto minmax(0, 1fr); }
  .dashboard .results.upcoming .result-row > .round-when { grid-column: auto; }
  .dashboard .result-row > .result-teams { grid-column: 1 / -1; }
}
/* Played rows: the date of the match under the result and competition badges (the same two columns the round badge spans in the upcoming card); the matchup keeps column 3 and is centred across both lines, so the score and the x stay on one axis. */
.dashboard .results.played .result-row { row-gap: 0; }
.dashboard .results.played .result-row > .round-kickoff { grid-column: 1 / 3; grid-row: 2; margin-top: 4px; }
.dashboard .results.played .result-row > .result-teams { grid-row: 1 / 3; }
@media (max-width: 640px) {
  .dashboard .results.played .result-row > .round-kickoff { grid-column: 3; grid-row: 1; margin: 0; }
  .dashboard .results.played .result-row > .result-teams { grid-row: 2; }
}
.dashboard .result-mid { font-weight: 800; }
.dashboard .placar-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  min-width: 44px;
  border: 1px solid #456b70;
  border-radius: 7px;
  background: #244448;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.dashboard .dash-squad .table-wrap { margin-top: 12px; }
.dashboard .dash-squad th, .dashboard .dash-squad td { padding-block: 13px; }
.start-card { border-color: #5b8052; background: #1b3534; }
.me-name { color: var(--accent-light); }

/* The advanced squad, transfer market and other GM screens share this skin. */
.gm-view {
  --gm-gold: var(--color-accent);
  --gm-ink: var(--text);
  --gm-muted: var(--muted);
  --gm-hairline: var(--surface-border);
  --gm-keeper: var(--pos-gk);
}
.gm-hero {
  border-color: #3c6c62;
  border-radius: 18px;
  background: linear-gradient(100deg, rgba(13, 38, 46, 0.98), rgba(12, 33, 41, 0.88) 54%, rgba(7, 29, 39, 0.52)),
    url('/assets/torcida-guache.webp') center 44% / cover;
}
.gm-eyebrow, .gm-section-index { color: var(--accent); }
.gm-metric {
  border-color: #3c5d67;
  background: rgba(8, 27, 39, 0.82);
  border-radius: 11px;
}
.gm-data-panel, .gm-filter-panel, .gm-market-stats > .card, .gm-market-stats.market-strip {
  background: linear-gradient(145deg, #192b3c, #10202e);
  border-color: #355062;
  border-radius: 15px;
}
.gm-view .tabs button, .gm-view .tabs a.tab { background: #1d3140; }
.gm-view .tabs :is(button, a.tab).active { background: #2a4638; border-color: #6b925b; color: var(--accent-light); }
.gm-view th { background: #1c3444; }
.gm-view td { border-color: #2b4555; }
.gm-tab-rail {
  background: #172938;
  border-color: #3a5364;
  box-shadow: var(--modern-shadow);
}
.gm-filter-panel :is(input, select) { background: #0e1c2a; color: var(--text); }
.gm-count-pill { border-color: #557e52; background: #213c35; }
.gm-market-stats .stat { color: var(--accent-light); }
.gm-hero-shortcut { color: var(--accent-light); }

/* Overlays should remain usable on narrow screens and visually match the app. */
.drawer, .modal {
  background: linear-gradient(155deg, #1a2c3c, #101d2a);
  border-color: #4a6575;
  box-shadow: 0 24px 64px rgba(0, 5, 12, 0.52);
  color: var(--text);
  overscroll-behavior: contain;
}
.drawer { width: min(460px, 100vw); padding: clamp(16px, 2vw, 28px); z-index: 46; }
.modal { border-width: 1px; border-radius: 18px; padding: clamp(18px, 2.2vw, 28px); max-height: calc(100dvh - 24px); }
.backdrop { z-index: 45; background: rgba(1, 9, 17, 0.72); backdrop-filter: blur(3px); }
.modal-backdrop { z-index: 59; }
.toast {
  border: 1px solid #4a6c7e;
  border-left: 4px solid var(--good);
  background: #203649;
  color: var(--text);
  border-radius: 12px;
  box-shadow: var(--modern-shadow);
}
.drawer-sep { border-top: 1px solid #395061; }
.outcome-badge.win { background: #22574c; color: #a3f4cf; }
.outcome-badge.draw { background: #635031; color: #ffe3a5; }
.outcome-badge.loss { background: #6b3444; color: #ffb3be; }

/* Login and registration share one full-bleed panoramic screen (Proposta 2, approved 28/11/2026):
   the gouache painting of the active scene fills the window, a glass card floats on the right and the
   three mini-cards switch both. Tokens only; no legacy neon green. */
.auth.auth-panoramic {
  display: flex; flex-direction: column; gap: 0;
  width: 100%; max-width: none; min-height: 100dvh; margin: 0;
  padding: clamp(14px, 2.2vh, 26px) clamp(16px, 3vw, 46px) clamp(10px, 1.6vh, 18px);
  place-items: stretch; overflow: hidden; isolation: isolate;
  background: var(--surface-bg); color: var(--text);
}
.auth-scene { position: fixed; inset: 0; z-index: -2; pointer-events: none; background: var(--surface-bg); }
.auth-scene-layer {
  position: absolute; inset: 0; opacity: 0; transition: opacity .9s ease;
  background-position: center; background-size: cover; background-repeat: no-repeat;
}
.auth-scene-layer[data-active="true"] { opacity: 1; }
.auth-scene-shade {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 34% 44%, rgba(212, 175, 55, .12), transparent 52%),
    linear-gradient(90deg, rgba(7, 25, 34, .84), rgba(7, 25, 34, .30) 48%, rgba(7, 25, 34, .88)),
    linear-gradient(180deg, rgba(7, 25, 34, .66), rgba(7, 25, 34, .10) 38%, rgba(7, 25, 34, .90));
}
.auth-goal-flash {
  position: absolute; inset: 0; opacity: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 30%, rgba(212, 175, 55, .42), transparent 66%);
}
.auth-cheer .auth-goal-flash { animation: gm-goal-flash 1.2s ease-out forwards; }
.auth-goal .auth-goal-flash { animation: gm-goal-flash .8s ease-out forwards; }
@keyframes gm-live-pulse { 50% { opacity: .45; box-shadow: 0 0 3px var(--color-accent); } }
@keyframes gm-goal-flash { 0% { opacity: 0; } 25% { opacity: 1; } 100% { opacity: 0; } }

.auth-topbar {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
  width: 100%; max-width: 1540px; margin: 0 auto;
}
.auth-brand { display: flex; align-items: center; gap: var(--space-3); min-width: 0; }
.auth-brand-shield {
  display: block; width: 58px; height: 67px; object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .65));
}
.auth-brand-copy { min-width: 0; }
.auth-brand-copy strong { display: block; font-size: clamp(1.4rem, 1.65vw, 1.7rem); font-weight: 900; letter-spacing: .06em; line-height: 1.05; }
.auth-brand-copy small { display: block; font-size: var(--text-xs); font-weight: 700; letter-spacing: .15em; color: var(--muted); }
/* The one sound button of the sign-in screen (login-music.mjs): muted and playing show different icons. */
.login-music-toggle {
  position: relative; display: grid; place-items: center; width: 38px; height: 38px; padding: 8px;
  border: 1px solid var(--surface-border-strong); border-radius: var(--radius-md);
  background: rgba(11, 35, 44, .75); color: var(--text); cursor: pointer;
}
.login-music-toggle svg { display: block; width: 20px; height: 20px; }
.login-music-toggle .sound-muted { display: none; }
.login-music-toggle[data-playing="false"] .sound-muted { display: initial; }
.login-music-toggle[data-playing="false"] .sound-waves { display: none; }
.login-music-toggle:hover { background: rgba(212, 175, 55, .16); }
.login-music-toggle:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }
/* EN | PT and the sound sit inside the card (owner, 29/11/2026): left edge on the text margin, right edge on the fields'. */
.auth-card-tools { display: flex; flex: none; align-items: center; justify-content: space-between; gap: var(--space-2); }
.auth.auth-panoramic .auth-card-tools .lang-switch { margin: 0; }
.auth-card-tools .lang-btn { min-width: 48px; min-height: 44px; padding: 0 12px; font-size: var(--text-sm); }
.auth-card-tools .login-music-toggle { flex: none; width: 46px; height: 46px; padding: 12px; }

.auth-main {
  position: relative; z-index: 1; flex: 1 1 auto;
  display: grid; grid-template-columns: minmax(0, 1fr) 440px;
  column-gap: clamp(24px, 3.4vw, 56px);
  align-content: start; align-items: start;
  width: 100%; max-width: 1540px; margin: 0 auto; min-height: 0;
  padding-block: clamp(6px, 1.2vh, 14px);
}
.auth-showcase { grid-column: 1; grid-row: 1; align-self: center; display: flex; flex-direction: column; gap: clamp(12px, 1.8vh, 20px); min-width: 0; max-width: 720px; }
.auth-showcase-copy { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
.auth-eyebrow {
  display: inline-flex; align-self: flex-start; align-items: center; gap: var(--space-2);
  padding: 6px 13px; border-radius: var(--radius-full);
  border: 1px solid rgba(212, 175, 55, .40); background: rgba(7, 25, 34, .72);
  color: var(--color-accent-light); font-size: var(--text-xs); font-weight: 800;
  letter-spacing: .11em; text-transform: uppercase;
}
.auth-live-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--color-pos);
  box-shadow: 0 0 8px var(--color-pos); animation: gm-live-pulse 2s ease-in-out infinite;
}
.auth-hero-title {
  margin: 0; max-width: 100%;
  font-family: 'GM Bebas', 'Barlow Condensed', var(--font-main);
  font-size: clamp(2.5rem, 5.35vw, 5.6rem); line-height: .9; letter-spacing: .015em;
  font-weight: 400; text-transform: uppercase; text-shadow: 0 6px 28px rgba(0, 0, 0, .65);
}
.auth-hero-title em { display: block; font-style: normal; color: var(--color-accent); }
.auth-hero-lead {
  margin: 0; max-width: 52ch; font-size: var(--text-base); line-height: 1.5;
  color: var(--text); text-shadow: 0 2px 12px rgba(0, 0, 0, .7);
}
.auth-scene-callout {
  display: grid; gap: 6px; max-width: 560px; padding: 16px 20px;
  border: 1px solid rgba(130, 178, 154, .32); border-radius: var(--radius-lg);
  background: rgba(7, 25, 34, .78); backdrop-filter: blur(8px);
}
.auth-callout-top {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  font-size: var(--text-xs); font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: var(--color-accent);
}
.auth-callout-chip { color: var(--color-accent-light); white-space: nowrap; }
.auth-callout-title { margin: 0; font-size: var(--text-lg); font-weight: 850; line-height: 1.2; color: var(--text); }
.auth-callout-text { margin: 0; font-size: var(--text-md); line-height: 1.45; color: var(--muted); }
.auth-scene-switcher { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); max-width: 640px; }
.auth-scene-card {
  display: block; height: 100%; min-width: 0; padding: 0; overflow: hidden; text-align: left; cursor: pointer;
  border: 1px solid rgba(130, 178, 154, .25); border-radius: var(--radius-lg);
  background: rgba(11, 35, 44, .78); color: var(--text); backdrop-filter: blur(6px);
}
.auth-scene-card img { display: block; width: 100%; height: 74px; object-fit: cover; }
.auth-scene-card .auth-scene-meta { display: block; padding: 8px 10px; }
.auth-scene-card .auth-scene-meta span {
  display: block; font-size: var(--text-xs); font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: var(--color-accent);
}
.auth-scene-card .auth-scene-meta strong { display: block; margin-top: 1px; font-size: var(--text-sm); font-weight: 750; color: var(--text); }
.auth-scene-card[aria-current="true"] { border: 1.5px solid var(--color-accent); box-shadow: 0 10px 24px rgba(0, 0, 0, .45); }
.auth-scene-card:hover { border-color: var(--color-accent-light); }
.auth-scene-card:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }
/* WCAG 2.2.2: the screen rotates on its own, so the player has an explicit way to stop it. */
.auth-scene-control {
  display: inline-flex; align-self: flex-start; align-items: center; gap: 6px; min-height: 44px;
  margin-top: -6px; padding: 0 2px; border: 0; background: none; color: var(--muted);
  font-size: var(--text-xs); font-weight: 700; letter-spacing: .04em; cursor: pointer;
}
.auth-scene-control:hover { color: var(--color-accent-light); }
.auth-scene-control:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }

.auth.auth-panoramic .auth-form-card {
  grid-column: 2; grid-row: 1; align-self: start; justify-self: stretch;
  width: 100%; max-width: 440px;
  display: flex; flex-direction: column; gap: clamp(9px, 1.3vh, 14px);
  padding: clamp(20px, 2.2vw, 28px);
  border: 1px solid rgba(212, 175, 55, .34); border-radius: 18px;
  background: rgba(11, 35, 44, .80); backdrop-filter: blur(14px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
}
.auth-social-icons { display: flex; align-items: center; gap: 10px; }
.auth-social-icon {
  display: grid; place-items: center; width: 34px; height: 34px;
  border: 1px solid var(--surface-border); border-radius: var(--radius-md);
  background: rgba(6, 25, 37, .54); color: var(--muted); text-decoration: none;
}
.auth-social-icon:hover { border-color: var(--color-accent-light); color: var(--text); }
.auth-social-icon:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.auth-social-symbol, .auth-social-symbol svg { display: block; width: 17px; height: 17px; }
/* The full sign-up (five fields, nine regions, the LGPD declarations and, in the closed alpha, the invite) is taller than a
   notebook screen. On a wide screen its fields scroll inside the card while the action keeps its own row below them, so the page
   never moves and no field is ever drawn under the button. The "create club" tab is also compacted to fit 1440x900 and 1280x800,
   with every text at 12 px or more (the documented minimum). */
@media (min-width: 801px) {
  .auth.auth-panoramic .auth-form-card {
    max-height: calc(100dvh - 168px); overflow: hidden; overscroll-behavior: contain;
  }
  .auth.auth-panoramic .auth-form-card form { display: flex; flex-direction: column; gap: 4px; flex: 1 1 auto; min-height: 0; }
  .auth-form-fields { display: grid; gap: 10px; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
  .auth-form-card form > button[type="submit"] { flex: none; }
  .auth-immersive.is-register .auth-form-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; }
  .auth-immersive.is-register .auth-form-fields > :is(.region-picker, .invite-field, .auth-declarations, .auth-forgot) { grid-column: 1 / -1; }
  .auth-immersive.is-register .auth-form-card { padding: clamp(12px, 1.3vw, 16px); gap: 4px; }
  .auth-immersive.is-register .auth-form-card .field { gap: 3px; }
  .auth-immersive.is-register .auth-form-card .field input { min-height: 40px; font-size: var(--text-sm); }
  .auth-immersive.is-register .auth-form-card .tabs button { min-height: 31px; padding: 3px 10px; }
  .auth-immersive.is-register .auth-form-card .region-picker { margin-bottom: 0; }
  .auth-immersive.is-register .auth-form-card .region-help { margin-bottom: 4px; font-size: var(--text-xs); line-height: 1.25; }
  .auth-immersive.is-register .auth-form-card .region-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
  .auth-immersive.is-register .auth-form-card .region-card { min-height: 37px; padding: 2px 6px; gap: 6px; }
  .auth-immersive.is-register .auth-form-card .region-name { font-size: var(--text-xs); line-height: 1.15; overflow-wrap: normal; word-break: normal; }
  /* The closed alpha's invite is one compact row: label beside the code. Its help stays in the accessible description. */
  .auth-immersive.is-register .auth-form-card .invite-field { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 0 10px; }
  .auth-immersive.is-register .auth-form-card .invite-field label { white-space: nowrap; font-size: var(--text-xs); }
  .auth-immersive.is-register .auth-form-card .invite-field input { min-height: 36px; }
  .auth-immersive.is-register .auth-form-card .invite-help { display: none; }
  .auth-immersive.is-register .auth-form-card .auth-declarations { gap: 2px; margin: 0; }
  .auth-immersive.is-register .auth-form-card .auth-check { min-height: 24px; font-size: var(--text-xs); }
  .auth-immersive.is-register .auth-form-card .auth-check > span { line-height: 1.2; }
  .auth-immersive.is-register .auth-login-heading { margin-top: 3px; }
  .auth-immersive.is-register .auth-login-heading h2 { font-size: clamp(1.3rem, 1.5vw, 1.6rem); }
  .auth-immersive.is-register .auth-login-heading p { margin-top: 3px; font-size: var(--text-xs); line-height: 1.3; }
  .auth-immersive.is-register .auth-card-foot { padding-top: 2px; }
  .auth-immersive.is-register .auth-card-foot .beta-notice { max-width: 340px; }
  .auth-immersive.is-register .auth-card-foot .beta-notice p { font-size: var(--text-xs); line-height: 1.12; }
  .auth-immersive.is-register .auth-card-foot .auth-social-icon { width: 26px; height: 26px; }
}

/* A notebook window (1280x800): a shorter top and bottom bar give the card the pixels it needs, and the sign-up drops the card
   subtitle. Everything else stays at 12 px or more. */
@media (min-width: 801px) and (max-height: 860px) {
  .auth.auth-panoramic { padding-top: 10px; padding-bottom: 4px; }
  .auth-main { padding-block: 6px; }
  .auth-brand-shield { width: 48px; height: 55px; }
  .auth-brand-copy strong { font-size: 1.3rem; }
  .auth-bottombar { padding-top: 6px; }
  .auth-immersive.is-register .auth-form-card { padding: 10px 12px; max-height: calc(100dvh - 124px); }
  .auth-immersive.is-register .auth-login-heading { margin-top: 1px; }
  .auth-immersive.is-register .auth-login-heading p { display: none; }
}

.auth-login-heading { margin-top: 5px; }
.auth-login-heading h2 {
  margin: 0; font-family: 'GM Bebas', 'Barlow Condensed', var(--font-main);
  font-size: clamp(2rem, 2.35vw, 2.75rem); line-height: .95; letter-spacing: .02em;
  font-weight: 400; text-transform: uppercase;
}
.auth-login-heading p { margin: 6px 0 0; font-size: var(--text-sm); line-height: 1.45; color: var(--muted); }
.auth-form-card .tabs { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); margin: 0; }
.auth-form-card .tabs button {
  min-height: 40px; padding: 8px 10px; font-size: var(--text-sm); font-weight: 750;
  border: 1px solid var(--surface-border-strong); border-radius: var(--radius-md);
  background: rgba(7, 25, 34, .65); color: var(--muted);
}
.auth-form-card .tabs button.active {
  background: rgba(212, 175, 55, .16); border-color: var(--color-accent); color: var(--color-accent-light);
}
.auth-form-card form { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.auth-form-card .auth-form-fields { display: grid; gap: 10px; min-width: 0; }
.auth-form-card .field {
  display: grid; gap: 6px; margin: 0;
  font-size: var(--text-xs); font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted);
}
.auth-form-card .field input {
  width: 100%; min-height: 44px; border: 1px solid var(--surface-border-strong); border-radius: var(--radius-md);
  background: rgba(8, 23, 33, .9); color: var(--text); padding: 0 12px;
  font-size: var(--text-md); letter-spacing: normal; text-transform: none;
}
.auth-form-card .field input:focus { border-color: var(--color-accent); box-shadow: 0 0 0 1px rgba(212, 175, 55, .35); outline: none; }
.auth-form-card .error:empty, .auth-form-card form > .muted:empty { display: none; }
.auth-form-card .error { margin: 0; font-size: var(--text-sm); }
.auth-form-card .auth-forgot { margin: -2px 0 0; text-align: right; }
.auth-form-card .auth-forgot a { color: var(--color-accent-light); font-weight: 650; }
.auth-form-card .auth-register-prompt { margin: 0; text-align: center; font-size: var(--text-sm); color: var(--muted); }
.auth-form-card .auth-register-prompt a { color: var(--color-accent-light); font-weight: 700; }
.auth-form-card .invite-field label { font-size: var(--text-xs); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.auth-form-card .invite-field input { width: 100%; min-height: 44px; }
.auth-form-card .invite-help { margin: 4px 0 0; font-size: var(--text-xs); text-transform: none; letter-spacing: normal; }
.auth-form-card .auth-check { font-size: var(--text-xs); letter-spacing: normal; text-transform: none; color: var(--muted); }
.auth-card-foot {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  margin-top: 2px; padding-top: 10px; border-top: 1px solid rgba(130, 178, 154, .22);
}
.auth-card-foot .beta-notice {
  display: block; margin: 0; padding: 0; border: 0; background: none; max-width: 210px;
}
.auth-card-foot .beta-notice .beta-badge { display: none; }
.auth-card-foot .beta-notice p { margin: 0; font-size: var(--text-xs); line-height: 1.35; color: var(--muted); }
.auth-card-foot .beta-notice strong { display: none; }
.auth-card-foot .auth-social-icons { margin: 0; flex: none; gap: 6px; }
.auth-card-foot .auth-social-icon { width: 30px; height: 30px; border-radius: var(--radius-md); }

.auth-bottombar {
  position: relative; z-index: 1; flex: none;
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
  margin-top: auto; padding-top: 10px; border-top: 1px solid rgba(130, 178, 154, .18);
  font-size: var(--text-xs); color: var(--muted);
}
.auth-bottombar .auth-footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0; max-width: none; }
.auth-bottombar a, .auth-bottombar .footer-link { color: var(--muted); font-size: var(--text-xs); }
.auth-bottombar a:hover, .auth-bottombar .footer-link:hover { color: var(--color-accent-light); }
.auth-bottombar-sign { white-space: nowrap; }
.auth-mobile-gateway, .auth-mobile-lang { display: none; }
.auth-mobile-back { display: none; }

@media (max-width: 1200px) {
  .auth-main { grid-template-columns: minmax(0, 1fr) 400px; column-gap: clamp(18px, 2.4vw, 32px); }
  .auth-hero-title { font-size: clamp(2.3rem, 4.9vw, 4.4rem); }
  .auth-scene-card img { height: 64px; }
}
@media (max-width: 1000px) and (min-width: 801px) {
  .auth-main { grid-template-columns: minmax(0, 1fr) 370px; column-gap: var(--space-4); }
  .auth-hero-title { font-size: clamp(2rem, 4.3vw, 3.5rem); }
  .auth-hero-lead { font-size: var(--text-md); }
  .auth-scene-callout { padding: 12px 14px; }
  .auth-callout-title { font-size: var(--text-md); }
  .auth-scene-card img { height: 54px; }
  .auth.auth-panoramic .auth-form-card { padding: 18px; }
}
@media (max-width: 800px) {
  .auth.auth-panoramic { padding: 12px 14px calc(4px + env(safe-area-inset-bottom)); }
  .auth-topbar { gap: var(--space-2); }
  .auth-brand-shield { width: 44px; height: 51px; }
  .auth-brand-copy strong { font-size: 1.2rem; }
  .auth-brand-copy small { font-size: 10px; letter-spacing: .1em; }
  .auth-main { display: block; padding-block: 10px 0; align-content: start; }
  .auth-showcase { max-width: none; gap: 12px; }
  .auth-hero-title { font-size: clamp(2.1rem, 9vw, 3.1rem); }
  .auth-hero-lead { font-size: var(--text-md); }
  .auth-mobile-gateway { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); margin-top: 2px; }
  .auth-mobile-gateway .btn { min-height: 42px; justify-content: center; }
  .auth-mobile-signup {
    border: 1px solid var(--color-accent) !important; background: rgba(212, 175, 55, .14) !important;
    color: var(--color-accent-light) !important;
  }
  .auth-mobile-lang { display: flex; margin-top: 12px; }
  .auth-scene-callout { padding: 12px 14px; max-width: none; }
  /* One gold line on a phone: the scene index and its kicker; the chip repeats the same label and only crowded the callout. */
  .auth-callout-top { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 2px 7px; font-size: 9.5px; letter-spacing: .04em; }
  .auth-callout-chip { display: none; }
  .auth-callout-title { font-size: var(--text-base); }
  .auth-callout-text { font-size: var(--text-sm); }
  .auth-scene-switcher { gap: var(--space-2); max-width: none; }
  .auth-scene-card img { height: 52px; }
  .auth-scene-card .auth-scene-meta { padding: 6px 7px; }
  .auth-scene-card .auth-scene-meta span { font-size: 10px; letter-spacing: .04em; }
  .auth-scene-card .auth-scene-meta strong { font-size: var(--text-xs); line-height: 1.2; }
  .auth.auth-panoramic .auth-form-card { max-width: none; padding: 18px 16px; gap: 10px; }
  .auth-login-heading h2 { font-size: clamp(1.8rem, 8vw, 2.3rem); }
  .auth-login-heading p { font-size: var(--text-xs); }
  .auth-mobile-back {
    display: inline-flex; align-self: flex-start; align-items: center; min-height: 40px;
    margin: -4px 0 0; padding: 0 2px; border: 0; background: none;
    color: var(--color-accent-light); font-size: var(--text-sm); font-weight: 700; cursor: pointer;
  }
  [data-mobile-view="showcase"] .auth-form-card, .auth.auth-panoramic[data-mobile-view="showcase"] .auth-form-card { display: none; }
  [data-mobile-view="form"] .auth-showcase, .auth.auth-panoramic[data-mobile-view="form"] .auth-showcase { display: none; }
  [data-mobile-view="form"] .auth-mobile-back { display: inline-flex; }
  .auth-card-foot { flex-wrap: wrap; gap: var(--space-2); }
  .auth-card-foot .beta-notice { max-width: 100%; order: 2; flex-basis: 100%; }
  .auth-bottombar { flex-direction: column; align-items: flex-start; gap: 6px; margin-top: 12px; }
  .auth-bottombar .auth-footer-links { gap: 2px 12px; }
  .auth-bottombar .auth-footer-links > span[aria-hidden] { display: none; }
  .auth-bottombar-sign { white-space: normal; }
}
@media (max-width: 440px) {
  .auth.auth-panoramic { padding: 10px 12px calc(8px + env(safe-area-inset-bottom)); }
  .auth-hero-title { font-size: clamp(1.95rem, 9.6vw, 2.5rem); }
  .auth-hero-lead { font-size: var(--text-sm); }
  .auth-eyebrow { font-size: 10px; padding: 5px 10px; letter-spacing: .08em; }
  .auth-scene-card img { height: 46px; }
  .auth-scene-card .auth-scene-meta span { font-size: 9px; }
  .auth-scene-card .auth-scene-meta strong { font-size: 11px; }
  .auth-scene-card .auth-scene-meta { padding: 5px 6px; }
  .auth-bottombar { font-size: 11px; }
  .auth-bottombar .auth-footer-links { gap: 2px 8px; }
  .auth-bottombar a, .auth-bottombar .footer-link { font-size: 11px; }
  .auth.auth-panoramic .auth-form-card { padding: 16px 13px; }
  .auth-card-foot .beta-notice p { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-scene-layer, .auth-scene-card { transition: none; }
  .auth-live-dot { animation: none; }
  .auth-scene-control { display: none; }
  .auth-cheer .auth-goal-flash, .auth-goal .auth-goal-flash { animation: none; }
}


/* Long club and player names must shrink within profile cards. */
.club-head, .profile-head { max-width: 100%; }
.club-head > div, .profile-head > div { min-width: 0; }
.club-head :is(h1, h2), .profile-head :is(h1, h2) { overflow-wrap: anywhere; }
.club-head p, .profile-head p { overflow-wrap: anywhere; }
.scoreboard { grid-template-columns: minmax(0, 1fr) minmax(0, auto) minmax(0, 1fr); }
.scoreboard > * { min-width: 0; }
.scoreboard .team { min-width: 0; }
.scoreboard .team a { max-width: 100%; overflow-wrap: anywhere; text-wrap: balance; }
.scoreboard > :nth-child(2) { overflow-wrap: anywhere; }
.lineups > .card { min-width: 0; }
.lineups h2 { overflow-wrap: anywhere; }

/* Responsive tracks must fit a 320px phone, including long localized labels. */
@media (max-width: 1180px) {
  .dashboard > .dash-matchday { grid-column: 1 / -1; }
  .dashboard > .dash-metrics { grid-column: 1 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dashboard > .dash-news, .dashboard > .dash-matches { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .modern-shell header.topbar { display: flex; flex-wrap: wrap; }
  .modern-shell header.topbar > .club-identity { flex: 1 1 auto; }
  .modern-shell header.topbar > .search { flex: 1 1 100%; max-width: none; order: 2; }
  .modern-shell header.topbar > .topbar-actions { flex: 1 1 auto; order: 3; }
  .modern-shell header.topbar > .admin-controls { order: 4; }
  .dashboard > .dash-matches { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  body { background: var(--bg); }
  .modern-shell { padding: 8px 8px calc(100px + env(safe-area-inset-bottom)); gap: 9px; }
  .modern-shell header.topbar { padding: 10px; border-radius: 13px; gap: 10px; }
  .modern-shell .club-identity { flex-basis: 100%; max-width: 100%; }
  .modern-shell .club-identity .brand { padding-right: 9px; }
  .modern-shell header.topbar > .search { order: 2; flex-basis: 100%; }
  .modern-shell header.topbar > .topbar-actions { order: 3; width: 100%; justify-content: space-between; gap: 6px; }
  .modern-shell .topbar-actions .club-chips { flex-wrap: wrap; min-width: 0; }
  .modern-shell .club-chips .chip { font-size: var(--text-xs); padding: 5px 7px; }
  .modern-shell .user-links { flex-wrap: wrap; }
  .modern-shell .user-links a { min-height: 44px; padding: 10px 7px; font-size: var(--text-xs); }
  .modern-shell .board { border-radius: 14px; padding: 14px 12px; }
  .modern-shell .mainmenu {
    position: fixed;
    left: max(8px, env(safe-area-inset-left));
    right: max(8px, env(safe-area-inset-right));
    bottom: calc(8px + env(safe-area-inset-bottom));
    border-radius: 16px;
    padding: 5px;
    gap: 3px;
    background: #162837;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.62);
  }
  .modern-shell .menu-tile, .modern-shell .menu-group.current .menu-tile {
    flex-direction: column;
    gap: 5px;
    justify-content: center;
    min-height: 62px;
    padding: 6px 2px;
    border-radius: 10px;
  }
  .modern-shell .menu-tile img { width: 25px; height: 25px; }
  .modern-shell .menu-title { font-size: clamp(0.63rem, 1.85vw, 0.76rem); line-height: 1.08; overflow-wrap: anywhere; }
  .modern-shell .menu-group.current .menu-tile::after { left: 8px; right: 8px; }
  .modern-shell .menu-group.open .menu-list {
    top: auto;
    bottom: calc(100% + 12px);
    width: min(270px, calc(100vw - 22px));
    max-height: min(64dvh, 440px);
  }
  .dashboard { gap: 12px; }
  .dashboard > .dash-matchday { min-height: 290px; padding: 20px 15px; }
  .dashboard .next-match-teams { gap: 8px; }
  .dashboard .next-vs { width: 36px; height: 36px; font-size: var(--text-xs); }
  .dashboard .next-team { font-size: clamp(0.9rem, 2.9vw, 1.25rem); }
  .dashboard > .dash-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dashboard .stat-card { padding: 14px 12px; }
  .dashboard .stat { font-size: clamp(1.25rem, 3.4vw, 1.7rem); overflow-wrap: anywhere; }
  .dashboard .stat-header { display: flex; flex-wrap: wrap; }
  .dashboard > .dash-matches { grid-template-columns: minmax(0, 1fr); }
  .gm-hero { padding: 20px 16px; }
  .site-footer { padding: 8px 4px; }
  .site-footer a { font-size: var(--text-xs); overflow-wrap: normal; word-break: normal; white-space: nowrap; }
  .modern-shell.stadium-app > .site-footer > .footer-start { display: contents; }
  .site-footer > .footer-start > a, .site-footer > .novidades-link { padding-inline: 2px; }
  .site-footer > .lang-switch .lang-btn { min-width: 2.25rem; min-height: 2.5rem; padding-inline: 0.375rem; }
  .site-footer .footer-social { justify-content: center; gap: 0.5rem; }
  .site-footer .footer-social .auth-social-icon { width: 2.75rem; height: 2.75rem; border-radius: 0.625rem; }
  .site-footer .footer-social .auth-social-symbol, .site-footer .footer-social .auth-social-symbol svg { width: 1.375rem; height: 1.375rem; }
  #toasts { left: 10px; right: 10px; bottom: calc(90px + env(safe-area-inset-bottom)); }
  .toast { max-width: none; }
  .drawer { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
  .modal { max-width: calc(100vw - 20px); }
}
@media (max-width: 560px) {
  .scoreboard { gap: 8px; padding: 14px 8px; }
  .scoreboard .team { font-size: clamp(0.82rem, 3.3vw, 1rem); line-height: 1.3; }
  .scoreboard .score { font-size: clamp(1.5rem, 6vw, 2rem); letter-spacing: 0; }
  .scoreboard .tactics-value { font-size: var(--text-xs); }
  .scoreboard > :nth-child(2) .muted { font-size: var(--text-xs); }
  .profile-head { gap: 10px; }
  .profile-head h1, .club-head h1 { font-size: clamp(1.25rem, 5vw, 1.85rem); }
  .dashboard > .dash-metrics { grid-template-columns: minmax(0, 1fr); }
  .dashboard .stat-card { padding: 16px 18px; }
  .dashboard .stat-header { display: flex; }
  .dashboard .next-match-head { margin-bottom: 10px; }
  .dashboard .next-match-teams { padding-block: 12px 18px; }
  .dashboard .next-team .team-with-crest { gap: 6px; }
  .dashboard .result-row { padding: 9px 7px; }
  .dashboard .rt-mark-home { margin-left: 5px; }
  .dashboard .rt-mark-away { margin-right: 5px; }
  .dashboard .result-mid { margin-inline: 4px; }
  .dashboard .result-teams { font-size: var(--text-sm); }
  .gm-view .tabs { max-width: 100%; }
  .gm-tab-rail .tabs a.tab { font-size: var(--text-xs); }
  .gm-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gm-metric { padding: 10px; }
  .gm-filter-panel { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 380px) {
  .club-head { gap: 10px; }
  .club-sponsor .sponsor-logo { width: 56px; height: 56px; }
  .club-head .crest-xl { --s: 72px; }
  .profile-head .avatar-busto { --avatar-size: 76px !important; }
  .scoreboard .crest-lg { --s: 62px; }
  .scoreboard .match-date { font-size: var(--text-xs); }
}
/* Trophies beside the club's name: one picture each, named on hover (trophies.mjs). */
.club-name-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.club-name-row h1 { margin: 0; }
/* The sponsor to the right of the club's name block (club page): a small label, the brand's logo and its name, in a column. */
.club-sponsor { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: none; margin-left: 24px; padding-left: 24px; border-left: 1px solid var(--line, rgba(255, 255, 255, 0.12)); text-align: center; max-width: 9rem; }
.club-sponsor-label { font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.club-sponsor .sponsor-logo { flex: none; width: 72px; height: 72px; }
.club-sponsor-name { font-size: var(--text-sm); font-weight: 600; overflow-wrap: anywhere; }
.club-line { display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; }   /* the name alone, centred (owner's request, 2026-11-12) */
.club-line .club { min-width: 0; text-align: center; }
/* The trophy room (trophies.mjs#trophyRoom): the trophies in the middle of the card, large, each named under it. */
.trophy-room { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 8px; }
.trophy-room-title { margin: 0; font-size: var(--text-base); font-weight: 750; letter-spacing: 0.02em; }
.trophy-room-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px 28px; width: 100%; }
.trophy-room-item { display: flex; flex-direction: column; align-items: center; width: 160px; text-align: center; }
.trophy-room-img.trophy { width: 120px; height: 120px; }
.trophy-room-name { margin: 8px 0 0; font-size: var(--text-sm); font-weight: 700; line-height: 1.3; }
.trophy-room-season { margin: 2px 0 0; font-size: var(--text-xs); color: var(--muted); }
.trophy-room-empty { margin: 0; }
@media (max-width: 640px) {
  .trophy-room-list { gap: 14px 12px; }
  .trophy-room-item { width: 120px; }
  .trophy-room-img.trophy { width: 88px; height: 88px; }
}
.topbar .trophy-row .trophy { width: 18px; height: 18px; }
.trophy-row { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.trophy { width: 28px; height: 28px; object-fit: contain; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35)); transition: transform 0.15s ease; }
/* On the club page the trophies are the point: much larger than the top bar's small ones. */
.club-name-row .trophy { width: 96px; height: 96px; }
.trophy:hover, .trophy:focus-visible { transform: translateY(-2px) scale(1.1); }
@media (max-width: 560px) {
  .club-name-row { gap: 6px; }
  .trophy { width: 24px; height: 24px; }
  .club-name-row .trophy { width: 72px; height: 72px; }
}
@media (max-width: 380px) {
  .modern-shell .menu-title { font-size: var(--text-xs); }
  .modern-shell .club-chips .chip { font-size: var(--text-xs); }
  .modern-shell .board { padding: 12px 10px; }
  .dashboard .next-team { font-size: var(--text-sm); }
  .dashboard .next-vs { width: 30px; height: 30px; }
  .dashboard .result-teams { font-size: var(--text-xs); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Final overrides: the compact mobile menus must win over the legacy sizes above. */
.modern-shell .menu-group.open .menu-list {
  width: max-content;
  min-width: min(190px, calc(100vw - 24px));
  max-width: min(232px, calc(100vw - 24px));
  padding: 5px;
}
.modern-shell .menu-list a,
.modern-shell .menu-group.current .menu-list a,
.modern-shell .menu-group.open .menu-list a {
  min-height: 40px;
  padding: 8px 11px;
  font-size: var(--text-sm);
  line-height: 1.25;
}
/* Desktop: the drop-down is exactly as wide as the tile that opens it. */
@media (min-width: 761px) {
  .modern-shell .menu-group.open .menu-list { width: 100%; min-width: 0; max-width: none; box-sizing: border-box; }
}
@media (max-width: 760px) {
  .modern-shell .menu-group.open .menu-list {
    max-height: min(58dvh, 360px);
    overflow-y: auto;
  }
}
