:root {
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --type-body: var(--text-base);
  --type-page-title: var(--text-xl);
  --type-section-title: var(--text-lg);
  --bg: var(--surface-bg);
  --panel: var(--surface-panel);
  --panel-2: var(--surface-card);
  --line: var(--surface-border-solid);
  --text: #eff7ed;
  --muted: #afc0cb;
  --accent: var(--color-accent);
  --accent-light: var(--color-accent-light);
  --accent-ink: var(--color-accent-ink);
  --muted-gold: #c4b48c;
  --good: var(--color-pos);
  --zone-up: var(--color-pos);   /* the table bands and the legend read these three, nothing else */
  --zone-play: #6fb7ff;
  --zone-down: var(--color-neg);
  --bad: var(--color-neg);
  --bad-text: var(--color-neg-text);
  --warn: var(--color-warn);
  --wood: #6b4a22;
  --wood-dark: #3a2610;
  --wood-edge: #a8843f;
  --row: #112d36;
  --row-2: #15333b;
  --row-hl: #23463d;   /* "my row" / "selected row": a soft tint, never a saturated fill; the accent bar marks it */
  --font-ui: var(--font-main);
  --pitch: #1f7a3f;
  --pitch-2: #1b6d38;
  --pitch-line: rgba(255, 255, 255, 0.55);
  --radius: var(--radius-md);
  --shadow: var(--shadow-md);
  font-family: var(--font-ui);
  color-scheme: dark;
}

* { box-sizing: border-box; font-style: normal; }
html { font-size: 93.75%; }   /* 15px at the root; every type token is N/15 rem */
html, body { margin: 0; color: var(--text); line-height: 1.65; letter-spacing: normal; font-weight: 400; }
/* The atmosphere of the game: the crowd painted in gouache at the top of the screen, dissolving into the deep green below
   it, and a fine paper grain over the whole sheet. Both live in one fixed layer behind the content, so the painting never
   ends in a hard cut at half a page however long the page is: it fades to the same colour the page continues in. */
body { background-color: var(--bg); min-height: 100vh; }
/* The layer itself is the first element of the body (index.html), so it sits behind the app without fighting the body's paint. */
.gm-atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 50% 0%, rgba(182, 243, 52, 0.08), transparent 60%),
    linear-gradient(180deg, rgba(7, 25, 34, 0.28) 0%, rgba(7, 25, 34, 0.74) 40%, var(--bg) 82%),
    url("/assets/torcida-guache.webp");
  background-position: center top;
  background-size: auto, auto, 100% auto;
  background-repeat: no-repeat;
}
/* The grain of the paper, over the painting and under the content. */
.gm-atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/assets/crest/guache-fosco-tile.webp") center / 320px 320px repeat;
  opacity: 0.05;
  mix-blend-mode: soft-light;
}
#app { position: relative; z-index: 1; }
@media (max-width: 760px) {
  .gm-atmosphere { background-image: radial-gradient(circle at 50% 0%, rgba(182, 243, 52, 0.08), transparent 60%), linear-gradient(180deg, rgba(7, 25, 34, 0.28) 0%, rgba(7, 25, 34, 0.74) 40%, var(--bg) 82%), url("/assets/torcida-guache-sm.webp"); }
}
a { color: var(--accent); text-decoration: none; }
/* Icons: one stroke set, drawn in currentColor (see src/icons.mjs); the grain sits under the stroke, so a lime icon looks painted. */
.gm-icon { display: inline-block; flex: 0 0 auto; vertical-align: -0.18em; }
a:hover { text-decoration: underline; }
button, input, select { font: inherit; color: inherit; letter-spacing: normal; }
:where(a, button, input, select, textarea, summary, [tabindex]:not([tabindex="-1"])):focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 2px;
}
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
h1, h2, h3 { margin: 0 0 0.65em; line-height: 1.3; font-family: var(--font-ui); }
h1 { font-size: var(--text-2xl); font-weight: 600; }
h2 { font-size: var(--text-lg); font-weight: 600; }
.board > .main > h1:first-child { font-size: var(--type-page-title); }
.board > .main > .card h2 { font-size: var(--type-section-title); }
h3 { font-size: var(--text-base); color: var(--muted); font-weight: 600; letter-spacing: normal; }
.muted { color: var(--muted); }
.good { color: var(--good); }
.bad { color: var(--bad-text); }
.warn { color: var(--warn); }
.num { font-variant-numeric: tabular-nums; text-align: center; }
.team-name { text-align: center; vertical-align: middle; }
.hidden { display: none !important; }

/* --- Buttons & forms --------------------------------------------------------------------- */
/* Estrutura do botao (caixa e alinhamento). Cor, forma, fonte, tamanho e estado vivem numa definicao unica no
   fim de styles/kit.css (tokens --btn-*): nenhuma folha pinta ou mede um botao por conta propria. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
}
label.field { display: grid; gap: 4px; margin-bottom: 12px; color: var(--muted); font-size: var(--text-md); }
.invite-field { display: grid; gap: 4px; margin-bottom: 12px; color: var(--muted); font-size: var(--text-md); }
.invite-field input { font-family: ui-monospace, Consolas, monospace; font-size: var(--text-base); }
.invite-help { margin: 0; font-size: var(--text-sm); }
input, select, textarea {
  min-height: 44px; background: #141c0c; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: var(--space-2) var(--space-3); width: 100%;
}
textarea { min-height: 7rem; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 0.78; }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--accent-light); }
.field-error, .error { color: var(--bad-text); }

/* --- Layout -------------------------------------------------------------------------------- */
.shell { width: 100%; max-width: none; margin: 0 auto; padding: 16px clamp(32px, 7vw, 180px) 40px; display: grid; gap: 18px; min-width: 0; }
.stadium-app > .board > .main,
.board > .main,
.main {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  min-width: 0;
}
.stadium-app > .board > .main:has(.dense-table-wrap, .table-wide, .table-wide-wrap),
.board > .main:has(.dense-table-wrap, .table-wide, .table-wide-wrap) {
  max-width: 1320px;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-ui); font-weight: 700; font-size: var(--text-lg); text-decoration: none; max-width: 100%; }
.brand:hover { text-decoration: none; filter: brightness(1.1); }
.brand-logo { display: block; width: 48px; height: 48px; object-fit: contain; flex-shrink: 0; border-radius: 8px; box-shadow: 0 0 0 1px rgba(168, 132, 63, 0.55), 0 2px 6px rgba(0, 0, 0, 0.45); }
/* The sign-in card screens: the login card's header (shield + name as text), centred. */
.brand-large { justify-content: center; gap: 16px; margin-bottom: 16px; }
.brand-large-shield { display: block; flex: none; width: 60px; height: 60px; object-fit: contain; filter: drop-shadow(0 4px 10px #0008); }
.brand-large-copy { display: grid; gap: 3px; min-width: 0; }
.brand-large-copy strong { color: #f7faf2; font-size: clamp(1.25rem, 1.65vw, 1.75rem); font-weight: 900; letter-spacing: .04em; line-height: 1.1; }
.brand-large-copy small { color: #c8d5d6; font-size: var(--text-xs); letter-spacing: .14em; font-weight: 750; }
/* The menu's centre: the logo plate, as tall as the tiles beside it, with a brown outline. */
.menu-logo { --logo-h: 60px; align-self: start; min-width: 0; width: auto; max-width: none; margin-inline: 0; justify-self: stretch; border: 3px solid var(--wood-dark); box-shadow: 0 0 0 2px rgba(168, 132, 63, 0.55), 0 4px 10px rgba(0, 0, 0, 0.45); }
@media (max-width: 1100px) { .menu-logo { --logo-h: 48px; padding-inline: 6px; } }   /* the tiles shrink here: so does the logo, to the same height */
@media (max-width: 560px) { .menu-logo { --logo-h: 34px; padding-inline: 3px; border-width: 2px; } }

/* Top menu: a wooden band with five painted tiles; each section's pages listed below its tile. */
.mainmenu {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; padding: 10px 14px 12px; border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(120, 82, 34, 0.55), rgba(70, 46, 16, 0.75)), url("/assets/tex-wood.jpg") center / cover;
  border: 3px solid var(--wood-dark); box-shadow: 0 0 0 2px rgba(168, 132, 63, 0.55), 0 10px 30px rgba(0, 0, 0, 0.55);
}
.menu-group { position: relative; min-width: 0; }
.menu-tile {
  display: grid; justify-items: center; gap: 0; padding: 4px 6px 6px; border-radius: 8px; color: var(--text); text-decoration: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.3)), url("/assets/tex-tile.jpg") center / cover;
  border: 2px solid #2c3a17; box-shadow: inset 0 0 0 2px rgba(214, 190, 120, 0.35), 0 4px 10px rgba(0, 0, 0, 0.45);
  transition: transform 0.12s ease, filter 0.12s ease;
}
.menu-tile:hover { text-decoration: none; transform: translateY(-2px); filter: brightness(1.1); }
.menu-tile img { width: 64px; height: 46px; object-fit: contain; margin-top: -2px; filter: drop-shadow(0 3px 2px rgba(0, 0, 0, 0.45)); }
.menu-title { position: relative; font-family: var(--font-ui); font-weight: 700; font-size: var(--text-base); line-height: 1.15; text-align: center; overflow-wrap: normal; hyphens: auto; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.6); }
.caret { display: none; }   /* only when the tile works as a drop-down (narrow screens) */
.tile-count { position: absolute; top: -6px; right: -18px; display: none; background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 0 6px; font-size: var(--text-xs); line-height: 1.5; }
.menu-group.current .menu-tile { background: linear-gradient(180deg, rgba(255, 240, 200, 0.05), rgba(60, 36, 8, 0.45)), url("/assets/tex-tile-active.jpg") center / cover; border-color: var(--wood-dark); }
.menu-list {
  box-sizing: border-box; overflow-wrap: normal; hyphens: auto; list-style: none; margin: 8px 0 0; padding: 6px 8px;
  font-family: var(--font-ui); font-size: var(--text-base); line-height: 1.5; border-radius: 4px; border: 2px solid transparent;
}
.menu-list li { padding-left: 0.85em; text-indent: -0.85em; }
.menu-list li::before { content: "•"; color: var(--muted); margin-right: 0.35em; }
.menu-list a { color: var(--text); text-shadow: 0 1px 0 rgba(0, 0, 0, 0.55); }
.menu-list a:hover { color: #fff6dc; text-decoration: underline; }
.menu-list .count { margin-left: 6px; background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 0 7px; font-family: var(--font-ui); font-size: var(--text-md); font-weight: 700; }
/* The current section: a drop-down box with the page highlighted (as in the mockup). */
.menu-group.current .menu-list, .menu-group.open .menu-list {
  padding: 4px; background: rgba(46, 32, 22, 0.94); border: 2px solid #1e140a; border-radius: 4px; box-shadow: 0 8px 18px rgba(0, 0, 0, 0.5);
}
.menu-group.current .menu-list li::before, .menu-group.open .menu-list li::before { content: none; }
.menu-group.current .menu-list li, .menu-group.open .menu-list li { padding-left: 0; text-indent: 0; }
.menu-group.current .menu-list a, .menu-group.open .menu-list a { display: flex; align-items: center; padding: 3px 8px; border-radius: 2px; }
.menu-group .menu-list a.active { background: linear-gradient(90deg, #4f6a2a, #3b5121); color: #fff6dc; text-decoration: none; }
/* Tablets and small laptops: the tiles stay in one row, the page lists open as drop-downs. */
@media (max-width: 1100px) {
  .mainmenu { gap: 8px; padding: 8px 10px 10px; }
  .menu-tile img { width: 48px; height: 34px; }
  .menu-title { font-size: var(--text-md); }
  .caret { display: inline; font-size: 0.8em; }
  .tile-count { display: inline-block; }
  .tile-count[hidden] { display: none; }
  .menu-list, .menu-group.current .menu-list { display: none; }
  .menu-group.open .menu-list { display: block; position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; width: max-content; min-width: min(230px, calc(100vw - 24px)); max-width: calc(100vw - 24px); margin: 0; font-size: var(--text-base); line-height: 1.6; }
  .menu-group:nth-child(n+4).open .menu-list { left: auto; right: 0; }
}

/* Club bar under the menu. */
.topbar { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; justify-content: space-between; margin-bottom: 20px; }
header.topbar {
  margin: 0; padding: 8px 16px; border-radius: 8px; background: rgba(28, 22, 12, 0.82); border: 2px solid var(--wood-dark);
  box-shadow: 0 0 0 1px rgba(168, 132, 63, 0.45), 0 6px 16px rgba(0, 0, 0, 0.4);
}
.topbar .club { font-family: var(--font-ui); font-size: var(--text-lg); font-weight: 700; line-height: 1.2; }
.club-identity { display: flex; align-items: center; gap: 12px; min-width: 0; max-width: 100%; }
.club-details { min-width: 0; overflow-wrap: anywhere; }
header.topbar { gap: 8px 16px; }
.club-chips .chip { font-size: var(--text-sm); padding: 3px 10px; }
/* Bar: club on the left, the search in the middle of the bar whatever the two sides hold, cash, fans and the account links on the right. */
.topbar-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px 10px; min-width: 0; }
.topbar-actions .club-chips { flex-wrap: nowrap; gap: 6px; }
.topbar-actions .club-chips .chip { font-size: var(--text-xs); padding: 2px 8px; white-space: nowrap; }
.topbar-actions .user-links { gap: 4px 8px; font-size: var(--text-md); }
/* Bar: the logo with the search right beside it on the left, the shield and the name of the club in the middle of the bar whatever the two sides hold,
   cash, fans and the account links on the right. Narrower than a wide laptop the wrapper disappears (its logo and search are items of the bar) and
   the search takes its own full-width row, as on a phone. */
.topbar-left { display: contents; }
header.topbar { min-width: 0; }   /* a long club name is cut inside the bar, it never widens it */
@media (max-width: 1099px) { header.topbar .topbar-left > .search { flex: 1 1 100%; max-width: none; order: 5; } }
@media (min-width: 1100px) {
  header.topbar { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px 16px; }
  header.topbar > .admin-controls { grid-column: 1 / -1; justify-self: end; }
  header.topbar > .topbar-left { grid-column: 1; display: flex; align-items: center; gap: 14px; justify-self: start; width: 100%; min-width: 0; }
  header.topbar > .topbar-left > .search { flex: 1 1 14rem; max-width: 22rem; }
  header.topbar > .club-identity { grid-column: 2; justify-self: center; max-width: 24rem; }
  header.topbar > .topbar-actions { grid-column: 3; justify-self: end; }
}
/* Header search: a combobox with a drop-down list; full width on its own row on phones. */
.search { position: relative; flex: 1 1 14rem; max-width: 22rem; min-width: 0; }
.search input { width: 100%; box-sizing: border-box; }
.search-results { position: absolute; z-index: 45; top: calc(100% + 4px); left: 0; right: 0; min-width: min(20rem, calc(100vw - 24px)); max-height: min(60vh, 24rem); overflow-y: auto; margin: 0; padding: 4px;
  list-style: none; background: #1a2410; border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.search-results[hidden] { display: none; }
.search-head { padding: 6px 8px 2px; font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.search-option { display: flex; flex-direction: column; gap: 1px; padding: 6px 8px; border-radius: var(--radius-sm); cursor: pointer; overflow-wrap: anywhere; }
.search-option.active { background: rgba(226, 182, 90, 0.22); outline: 1px solid var(--accent); }
.search-sub { font-size: var(--text-sm); }
.search-note { padding: 8px; font-size: var(--text-md); color: var(--muted); }
.search-note.empty { color: var(--text); }
@media (max-width: 760px) { .search { flex-basis: 100%; max-width: none; order: 5; } .search-results { max-height: 50vh; } }
.user-links { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: var(--text-md); }
.user-links a { color: var(--muted); padding: 4px 2px; }
.user-links a:hover, .user-links a.active { color: var(--text); text-decoration: underline; }
.admin-controls { align-items: center; padding: 2px 8px; border: 1px dashed rgba(226, 182, 90, 0.5); border-radius: 8px; }
.admin-label { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.06em; }
.site-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 18px; font-size: var(--text-sm); }
.site-footer a { color: var(--muted); padding: 6px 4px; }
.site-footer a:hover { color: var(--text); }

/* The board: the page itself, a painted green panel in a rough wooden frame. */
.board {
  padding: 20px 22px 26px; border-radius: 12px; min-width: 0;
  background: linear-gradient(180deg, rgba(30, 40, 18, 0.55), rgba(18, 26, 10, 0.75)), url("/assets/tex-panel.jpg") center / 600px;
  border: 4px solid #2b2410; box-shadow: 0 0 0 2px rgba(120, 104, 52, 0.7), inset 0 0 40px rgba(0, 0, 0, 0.45), 0 14px 40px rgba(0, 0, 0, 0.6);
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: rgba(20, 28, 12, 0.85); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 4px 12px; font-size: var(--text-md); }
.chip b { color: var(--accent); font-variant-numeric: tabular-nums; }
.tabular-num { font-variant-numeric: tabular-nums; }

.grid { display: grid; gap: 16px; min-width: 0; }
.grid > * { min-width: 0; }
.summary-grid > * > :not(h1, h2, h3) { text-align: left; }
.summary-grid > * > :is(h1, h2, h3) { text-align: left; font-size: var(--text-xs, 0.75rem); text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.summary-grid .stat { text-align: left; font-variant-numeric: tabular-nums; }
.summary-grid .stat small, .summary-grid .stat .unit { font-size: var(--text-sm, 0.8125rem); color: var(--muted); font-weight: 500; }
.summary-grid .cash-flow-row { justify-content: flex-start; }
/* Fit the available space, including grids nested inside another card. */
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, max(24rem, calc((100% - 16px) / 2))), 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, max(18rem, calc((100% - 32px) / 3))), 1fr)); }
.grid.cols-3-2 { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.grid.cols-1-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.card {
  background: linear-gradient(180deg, rgba(22, 32, 13, 0.82), rgba(16, 24, 9, 0.9)), url("/assets/tex-card.jpg") center / 500px;
  border: 2px solid #3d3c1c; border-radius: var(--radius-sm); padding: var(--space-4); width: 100%; min-width: 0; overflow-x: auto; overflow-wrap: anywhere;   /* a wide table scrolls inside its card */
  box-shadow: inset 0 0 0 1px rgba(190, 170, 100, 0.12), 0 4px 14px rgba(0, 0, 0, 0.35);
}
.card > :is(h1, h2, h3):first-child { margin-top: 0; }
.board > .main > .card:first-child, .board > .main > h1:first-child { margin-top: 0; }
.stat { font-size: var(--text-xl); font-weight: 800; }
.stat small { font-size: var(--text-md); color: var(--muted); font-weight: 500; }

/* --- Tables --------------------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; }
.squad-table { table-layout: fixed; font-size: clamp(16px, 1.05vw, 20px); }
/* Narrow screens: no fixed layout and no attribute columns (they live in the player's drawer). */
@media (max-width: 1000px) {
  .squad-table { table-layout: auto; font-size: var(--text-md); }
  .squad-table .skill-col { display: none; }
  .squad-table :is(th, td) { padding: 8px 6px; }
}
.squad-table :is(th, td) { text-align: center; vertical-align: middle; padding: 9px 3px; white-space: normal; overflow-wrap: anywhere; }
.squad-table :is(th, td).player-col { padding-left: 8px; }
.squad-table th { font-size: clamp(13px, 0.85vw, 16px); letter-spacing: normal; padding-inline: 1px; white-space: nowrap; overflow-wrap: normal; }
.squad-table .stars { font-size: 0.9em; letter-spacing: 0; }
.squad-table .skill { min-width: 0; padding: 0; }
.squad-positions { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 3px; }
.squad-positions .pos { min-width: 0; padding: 1px 4px; font-size: 0.85em; }
table { width: 100%; border-collapse: collapse; font-size: var(--text-base); }
/* Tables: every cell, header included, is centred; only the player-name column (marked .player-col by tables.mjs) is left-aligned. */
th, td { padding: 8px 10px; border-bottom: 1px solid rgba(0, 0, 0, 0.35); text-align: center; vertical-align: middle; font-variant-numeric: tabular-nums; }
table :is(th, td).player-col, table :is(th, td).email-col { text-align: left; }
th, td.num, td .badge, td .stars { white-space: nowrap; }
td.wrap { white-space: normal; overflow-wrap: anywhere; }
table { font-size: var(--text-md); }
/* Columns that leave on narrower screens; .only-sm shows their content inline instead. */
.only-sm { display: none; }
@media (max-width: 1200px) { .hide-md { display: none !important; } }
@media (max-width: 760px) { .hide-sm { display: none !important; } .only-sm { display: block; font-size: var(--text-sm); } }
.table-wrap { overflow-x: auto; background:
  linear-gradient(90deg, rgba(22, 32, 13, 1) 30%, transparent) left / 24px 100% no-repeat local,
  linear-gradient(270deg, rgba(22, 32, 13, 1) 30%, transparent) right / 24px 100% no-repeat local,
  radial-gradient(farthest-side at 0 50%, rgba(0, 0, 0, 0.45), transparent) left / 12px 100% no-repeat scroll,
  radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, 0.45), transparent) right / 12px 100% no-repeat scroll; }
/* My bids: status and raise button in one cell, the button pinned to the right edge, the status cut short (ellipsis) before the button shrinks. */
.cut-name { max-width: 18rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }   /* a name is cut only when it is longer than this: the column takes what the name needs */
.bid-action { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.bid-status { flex: 1 1 5.5rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bid-status .badge { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.bid-action .btn { flex: none; white-space: nowrap; }
.table-legend { font-size: var(--text-sm); margin: 0 0 10px; }
.club-list :is(th, td) { padding: 8px 6px; }
.club-list td:not(.num) { white-space: normal; overflow-wrap: normal; }
/* The club cell of a standings table is a real table cell (it used to be display:flex inline, which took it out of the table: its own box, its own 1px offset, so the row rule broke
   there). The crest and the name are laid out by .team-with-crest inside it, so every cell of the row shares one top, one bottom and one continuous rule. */
.club-list td.align-club { padding-left: 0.5rem; text-align: left; white-space: nowrap; }
th { color: var(--muted); font-weight: 600; font-size: var(--text-md); letter-spacing: 0.02em; position: sticky; top: 0; background: #1b2510; }
tbody tr:nth-child(odd) td { background: var(--row); }
tbody tr:nth-child(even) td { background: var(--row-2); }
th.sortable { cursor: pointer; }
th.sortable:hover { color: var(--text); }
tbody tr.me td { background: var(--row-hl); }
tbody tr.me td:first-child { box-shadow: inset 3px 0 var(--accent); }
tbody tr:hover td { background: #3a4a26; }
tr.clickable { cursor: pointer; }
tr.clickable:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.zone-up { --zone-color: var(--zone-up); }
.zone-play { --zone-color: var(--zone-play); }
.zone-down { --zone-color: var(--zone-down); }
:is(.zone-up, .zone-play, .zone-down) td:first-child { box-shadow: inset 3px 0 var(--zone-color); }
/* The legend under the table: the same colour as the band, as a small bar before the (translated) name. */
/* The league's two pickers: side by side where there is room, stacked on a phone. */
.league-pickers { display: flex; flex-wrap: nowrap; gap: 8px 12px; align-items: end; }   /* Division and Group on one row, on phones too */
.league-pickers .field { margin: 0; flex: 1 1 0; min-width: 0; }
.league-pickers select { width: 100%; min-height: 44px; }
#cup-region option.mine { font-weight: 700; }   /* the manager's own region, in bold in the list */
.cup-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; }
.cup-heading h1 { margin: 0; overflow-wrap: anywhere; }
.podium-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; font-size: var(--text-base); }
.cup-podium h3 { margin: 12px 0 6px; }
@media (max-width: 520px) { .league-pickers { width: 100%; } }
.zone-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0 0; padding: 0; font-size: var(--text-md); color: var(--muted); }
.zone-legend li { display: inline-flex; align-items: center; gap: 8px; min-height: 24px; }
.zone-swatch { flex: none; width: 14px; height: 14px; border-radius: 3px; background: var(--zone-color); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35); }
/* High-contrast / forced-colours modes and printing replace or drop backgrounds and shadows: the band colours are the information here, so they stay. */
.zone-swatch, :is(.zone-up, .zone-play, .zone-down) td:first-child { forced-color-adjust: none; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.zone-up td { background-image: linear-gradient(90deg, rgba(110, 170, 60, 0.28), transparent 70%); }
.zone-down td { background-image: linear-gradient(90deg, rgba(150, 50, 30, 0.45), rgba(110, 36, 20, 0.25)); }
.club-list .pos-cell { white-space: nowrap; width: 44px; min-width: 44px; text-align: center; }

.stars { color: var(--accent); letter-spacing: 1px; white-space: nowrap; }
.stars .off { color: #46505c; }
/* Half star: the glyph itself painted half gold, half off (an overlay clipped to 50% drifted with letter-spacing). */
.stars .half {
  display: inline-block; letter-spacing: 0; margin-right: 1px; color: transparent;
  background: linear-gradient(90deg, #d4af37 50%, #46505c 50%); -webkit-background-clip: text; background-clip: text;
}
.squad-table .stars .half { margin-right: 0; }
.pos { display: inline-block; min-width: 34px; text-align: center; padding: 1px 6px; border-radius: var(--radius-sm); font-size: var(--text-md); font-weight: 700; background: #29453a; }
.pos.gk { background: #7b5a00; } .pos.d { background: #1f4f7a; } .pos.m { background: #2e6b3e; } .pos.f { background: #7a2b2b; }
.skill { display: inline-block; min-width: 24px; text-align: center; border-radius: 5px; padding: 0 4px; font-weight: 600; }
/* The colour comes from ui.mjs#skillColor: a red-white-green gradient over 1 to 20 (15/11/2026). */
.badge { display: inline-block; font-size: var(--text-md); padding: 1px 7px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); }
.badge.bad { border-color: var(--bad); color: var(--bad-text); }
.badge.good { border-color: var(--good); color: var(--good); }
.badge.warn { border-color: var(--warn); color: var(--warn); }
/* Empty state of a card or list: one sentence and the action that fills it. */
.empty { display: grid; gap: 10px; justify-items: start; padding: 6px 0; }
.empty p { margin: 0; }
/* Vertical rhythm for a page: cards stacked in the main column. */
.stack > * + * { margin-top: 16px; }
/* Keyboard focus on everything clickable, not only inputs. */
.menu-tile:focus-visible, .menu-list a:focus-visible, a.news-item:focus-visible, .tabs a.tab:focus-visible, .chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* --- Auth ----------------------------------------------------------------------------------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.auth .card { width: min(560px, 100%); box-shadow: var(--shadow); }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.tabs button, .tabs a.tab { white-space: nowrap; }
.tabs button { flex: 1 1 auto; padding: 9px 14px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.2); border-radius: var(--radius-sm); cursor: pointer; font-family: var(--font-ui); font-weight: 700; font-size: var(--text-base); }
.tabs button.active { background: linear-gradient(180deg, #c79a45, #8d6426); color: #fff4d6; border-color: #e7c57a; }
.tabs a.tab { padding: 6px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-family: var(--font-ui); font-weight: 700; font-size: var(--text-base); text-decoration: none; color: inherit; background: rgba(0, 0, 0, 0.2); }
.tabs a.tab.active { background: linear-gradient(180deg, #c79a45, #8d6426); color: #fff4d6; border-color: #e7c57a; }
.card > .tabs { margin: 12px 0 0; flex-wrap: wrap; }
.error { color: var(--bad-text); min-height: 1.4em; font-size: var(--text-md); }

/* --- Tactics ---------------------------------------------------------------------------- */
.tactics { display: grid; grid-template-columns: minmax(0, 1fr) minmax(420px, 0.85fr); gap: 24px; align-items: start; }
.tactics > * { min-width: 0; }
.pitch {
  container-type: inline-size;
  position: relative; aspect-ratio: 68 / 92; width: 100%; max-width: 640px; margin: 0 auto; border-radius: 12px;
  background: repeating-linear-gradient(0deg, rgba(20, 55, 18, 0.26) 0 10%, rgba(100, 123, 42, 0.15) 10% 20%), url('/assets/tex-tile.jpg') center / cover;
  border: 4px solid var(--wood-edge); box-shadow: inset 0 0 0 2px rgba(243, 232, 204, 0.3), inset 0 0 36px rgba(25, 34, 15, 0.35), var(--shadow); overflow: hidden; user-select: none;
}
.pitch-tag { position: absolute; left: 50%; top: 53.5%; transform: translate(-50%, -50%); white-space: nowrap; padding: 1px 10px; border-radius: 999px; background: rgba(20, 16, 8, 0.78); color: #fff6dc; font-size: var(--text-sm); pointer-events: none; }   /* the middle of the pitch, under the players (they paint over it when the middle is taken) */
.bench-title { max-width: 640px; margin: 14px auto 0; display: flex; align-items: baseline; justify-content: center; gap: 10px; }
.orders-card { margin-top: 16px; }
/* The orders card now sits in the narrower right column: the sentence wraps (the "nowrap" row of the wide screens would crush its selects). */
.orders-card .order-form, .orders-card .order-params { flex-wrap: wrap; }
.orders-card .order-form select { min-width: 7rem; }
.orders-card .order-form input { min-width: 4.5rem; }
.subs-tag { font-size: var(--text-md); font-weight: 400; }
.tactics-status { font-size: var(--text-md); }
.pitch .marking { position: absolute; border: 2px solid var(--pitch-line); pointer-events: none; }
.pitch .halfway { left: 0; right: 0; top: 50%; border-width: 2px 0 0; }
.pitch .circle { left: 50%; top: 50%; width: 22%; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%); }
.pitch .box-top { left: 22%; right: 22%; top: 0; height: 15%; border-top: 0; }
.pitch .box-bottom { left: 22%; right: 22%; bottom: 0; height: 15%; border-bottom: 0; }
.slot {
  position: absolute; width: 19%; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 2px;
  font-size: var(--text-md); text-align: center; cursor: pointer;
}
.slot .shirt {
  width: clamp(58px, 17cqw, 94px); height: clamp(58px, 17cqw, 94px);
  border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: clamp(16px, 4.5cqw, 26px);
  background: rgba(0, 0, 0, 0.25); border: 2px dashed rgba(255, 255, 255, 0.45); color: rgba(255, 255, 255, 0.75);
}
.slot.filled .shirt { background: var(--accent); color: var(--accent-ink); border: 2px solid #fff; }
.slot.filled.gk .shirt { background: #ff9f1c; }
/* The portrait fills the disc (its size follows the fluid shirt). */
.slot.filled .shirt { position: relative; padding: 0; }
.slot .shirt .avatar { width: 100%; height: 100%; border: 0; }
.player-row .person { display: flex; max-width: 100%; }
.slot.empty .shirt {
  padding: 2px;
  font-size: clamp(14px, 4cqw, 23px);
  line-height: 1;
  letter-spacing: normal;
  white-space: nowrap;
}
.slot .label { background: rgba(0, 0, 0, 0.55); padding: 1px 6px; border-radius: var(--radius-sm); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot.over .shirt, .bench-slot.over, .player-row.over { outline: 3px solid #fff; outline-offset: 2px; }
.slot.selected .shirt, .player-row.selected { outline: 3px solid var(--accent); outline-offset: 2px; }
.slot.empty:not(.over) { opacity: 0.55; }
.slot.empty:hover { opacity: 1; }
.mood { font-size: var(--text-md); font-weight: 700; }
.mood.m0 { color: #c8ffd9; } .mood.m1 { color: #fff3a0; } .mood.m2 { color: #ffd27a; } .mood.m3 { color: #ffab7a; } .mood.m4 { color: #ff8d8d; }
.bench { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; max-width: 640px; margin: 14px auto 0; }
.bench-slot { overflow-wrap: anywhere; min-height: 64px; border: 2px dashed var(--line); border-radius: 8px; display: grid; place-items: center; text-align: center; font-size: var(--text-md); padding: 4px; cursor: pointer; }
.bench-slot.filled { border-style: solid; background: var(--panel-2); }
.player-list { max-height: 60vh; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.player-row { display: grid; grid-template-columns: calc(var(--position-count, 2) * 2.6rem + 8px) minmax(0, 1fr) auto auto; gap: 14px; align-items: center; height: 64px; padding: 7px 10px; border-bottom: 1px solid var(--line); cursor: grab; background: var(--panel); }
.player-positions { display: flex; flex-wrap: nowrap; align-items: center; gap: 4px; white-space: nowrap; }
.player-positions .pos { flex-shrink: 0; }
.player-row .name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Phones: the name column was ~60 px (nothing left for the name once a status icon came); tighter columns give it room, the icons keep theirs. */
@media (max-width: 560px) {
  .player-row { grid-template-columns: calc(var(--position-count, 2) * 2.05rem + 2px) minmax(0, 1fr) auto auto; gap: 8px; padding: 7px 6px; }
  .player-row .avatar { --avatar-size: 26px !important; }
  .player-row .person { gap: 6px; }
  .player-row .stars { font-size: var(--text-xs); letter-spacing: 0; }
}
.player-row:hover { background: var(--panel-2); }
.player-row.used { opacity: 0.45; }
.tactic-controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 14px; }
.order-form, .order-params { align-items: center; justify-content: flex-start; }
.order-form { gap: 10px; margin-bottom: 16px; overflow-wrap: normal; white-space: nowrap; }   /* keep "Quando", "sai", "entra" whole */
.order-form select { width: auto; min-width: 0; max-width: min(100%, 14rem); flex: 0 1 auto; }
.order-params { min-width: 0; max-width: 100%; }
.order-form .btn { align-self: center; flex: none; }
.inline-pick { flex-wrap: nowrap; align-items: center; }
.inline-pick > :is(select, input) { width: auto; min-width: 0; max-width: min(100%, 22rem); flex: 1 1 auto; }
.inline-pick > .btn { flex: none; white-space: nowrap; }
.sell-guaranteed { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: var(--text-md); cursor: pointer; }
.sell-guaranteed input { width: auto; margin: 0; }
.market-filters { align-items: center; }
.market-filters > :is(input, select) { width: auto; min-width: 0; max-width: min(100%, 22rem); flex: 1 1 110px; }
.market-filters > select { flex-basis: 190px; width: auto; max-width: min(100%, 22rem); }
@media (min-width: 900px) {
  .market-filters { flex-wrap: nowrap; }
  .order-form, .order-params { flex-wrap: nowrap; }
  .order-form { gap: 8px; }
  .order-params { flex: 0 1 auto; }
}

/* --- Match --------------------------------------------------------------------------- */
.scoreboard { display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 16px; text-align: center; padding: 20px; }
.match-date { font-size: var(--text-md); margin-bottom: 4px; }
.match-date[hidden] { display: none; }
.match-date .date-short { display: none; }
.match-date { white-space: nowrap; }
@media (max-width: 560px) { .match-date .date-long { display: none; } .match-date .date-short { display: inline; } }
.scoreboard .team { font-size: var(--text-lg); font-weight: 800; }
.scoreboard .score { font-size: 2.6rem; font-weight: 900; letter-spacing: 0.08em; color: var(--accent); font-variant-numeric: tabular-nums; }
.timeline { display: grid; gap: 8px; }
.event { display: grid; grid-template-columns: 52px 1fr; gap: 10px; padding: 9px 12px; border-radius: 8px; background: var(--panel-2); border-left: 4px solid transparent; }
.event.home { border-left-color: #6fb7ff; }
.event.away { border-left-color: #ff9f6f; }
.event.goal { background: rgba(244, 196, 48, 0.16); border-left-color: var(--accent); font-weight: 600; }
.event .min { font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.event .lines p { margin: 0 0 2px; }
.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 40px 1fr 40px; gap: 8px; align-items: center; font-size: var(--text-md); }
.bar { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: var(--line); }
.bar span:first-child { background: #6fb7ff; }
.bar span:last-child { background: #ff9f6f; }
.live-controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.clock { font-size: var(--text-base); font-weight: 800; color: var(--accent); min-width: 56px; }

/* --- Youth --------------------------------------------------------------------------- */
.candidates { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: 14px; }
.skills-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 14px; font-size: var(--text-md); }
.skills-grid div { display: flex; justify-content: space-between; }

/* --- Drawer / toasts ------------------------------------------------------------------ */
.drawer { position: fixed; inset: 0 0 0 auto; width: min(420px, 100vw); background: #1a2410 url("/assets/tex-card.jpg") center / 500px; border-left: 1px solid var(--line); box-shadow: var(--shadow); padding: 20px; overflow-y: auto; z-index: 20; }
.drawer:focus { outline: none; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.main:focus, .modal:focus { outline: none; }   /* focus lands here by script (new page, new dialog), not by a control */
.backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.45); z-index: 19; }
#toasts { position: fixed; right: 18px; bottom: 18px; display: grid; gap: 8px; z-index: 100; }   /* above the radio pill (99) */
.toast { background: var(--panel-2); border: 1px solid var(--line); border-left: 4px solid var(--good); padding: 10px 14px; border-radius: 8px; box-shadow: var(--shadow); max-width: 360px; }
.toast.error { border-left-color: var(--bad); }
.toast.warn { border-left-color: var(--warn); }
#toasts-status, #toasts-alerts { display: grid; gap: 8px; }
#toasts-status:empty, #toasts-alerts:empty { display: none; }
/* An error stays until its ✕ is pressed: the text and the button side by side. */
.toast.error { display: flex; align-items: flex-start; gap: 10px; }
.toast-text { flex: 1 1 auto; min-width: 0; }
.toast-close { flex: 0 0 auto; background: none; border: 0; color: inherit; font: inherit; line-height: 1.4; padding: 0 2px; cursor: pointer; opacity: 0.8; }
.toast-close:hover, .toast-close:focus-visible { opacity: 1; }
/* The next calendar step under the club's name in the top bar ("Next: Training · Tue 12:00 (in 18 h)") and the same line on Training and Youth. */
.club-next { color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.club-next b { color: var(--text); font-weight: 700; }
.next-session { margin: 0 0 12px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.loading { color: var(--muted); padding: 30px; text-align: center; }

@media (max-width: 1100px) {
  .tactics { grid-template-columns: 1fr; }
  .grid.cols-3-2, .grid.cols-1-2 { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .shell { padding: 8px 8px 30px; gap: 10px; }
  .mainmenu { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; padding: 8px 6px; }
  .menu-tile { padding: 2px 2px 4px; }
  .menu-tile img { width: 34px; height: 26px; }
  .menu-title { font-size: var(--text-xs); line-height: 1.1; letter-spacing: -0.01em; }
  h1 { font-size: var(--text-lg); }
  h2 { font-size: var(--text-lg); }
  .table-legend { display: none; }
  .tile-count { right: -10px; top: -8px; }
  .menu-group:nth-child(n+3).open .menu-list { left: auto; right: 0; }
  header.topbar { padding: 8px 10px; }
  .topbar .club { font-size: var(--text-base); }
  .club-chips { gap: 6px; }
  .club-chips .chip { font-size: var(--text-xs); padding: 2px 8px; }
  .board { padding: 14px 10px 20px; }
  .bench-slot { overflow-wrap: normal; overflow: hidden; text-overflow: ellipsis; }
  /* Phones: table cells never wrap (the table scrolls inside its card instead); only .wrap cells do. */
  table :is(th, td), .squad-table :is(th, td) { white-space: nowrap; overflow-wrap: normal; }
  td.wrap, .squad-table td.wrap { white-space: normal; overflow-wrap: anywhere; }
  .squad-positions, .pos { flex-wrap: nowrap; white-space: nowrap; }
  .grid.cols-2, .grid.cols-3, .grid.cols-3-2, .grid.cols-1-2, .tactic-controls { grid-template-columns: 1fr; }
  .slot { font-size: var(--text-md); }
}

/* Stadium */


/* News */
.news { display: grid; gap: var(--space-1, 4px); }
.news-item { display: flex; gap: var(--space-3, 12px); align-items: flex-start; padding: 10px var(--space-2, 8px); border-radius: var(--radius-md, 8px); }
.news-item.unread { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.news-item.selected { background: color-mix(in srgb, var(--accent) 18%, var(--surface-card, var(--panel-2))); outline: 1px solid var(--surface-border-soft, var(--line)); }
.news-icon { font-size: var(--text-lg); line-height: 1.4; }
/* Title and the item's own link are two elements: the title takes the line, the link keeps its own column. */
.news-body { flex: 1; min-width: 0; }
.news-line { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.news-text { flex: 1 1 auto; min-width: 0; }
.news-date { margin-top: 4px; font-size: var(--text-xs, 0.8125rem); }

/* Messages and chat */
.thread {
  display: flex; flex-direction: column; gap: var(--space-2, 8px); max-height: 55vh; overflow-y: auto; padding: var(--space-3, 12px);
  background: var(--surface-card-raised, rgba(14, 20, 8, 0.75)); border: 1px solid var(--line); border-radius: var(--radius-md, 8px);
}
.bubble { align-self: flex-start; max-width: 75%; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-lg, 12px); padding: var(--space-2, 8px) var(--space-3, 12px); white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble.mine { align-self: flex-end; background: color-mix(in srgb, var(--accent) 16%, var(--panel-2)); }
.chat-line {
  padding: 6px 10px; border-radius: var(--radius-sm); background: rgba(30, 42, 18, 0.45);
  border-left: 3px solid var(--wood-edge); overflow-wrap: anywhere; font-size: var(--text-md); line-height: 1.45;
}
.chat-line:hover { background: rgba(38, 54, 23, 0.65); }
.chat-line b { color: var(--accent-light); }
.chat-input-bar { display: flex; gap: 10px; align-items: center; margin-top: 14px; }
textarea { width: 100%; box-sizing: border-box; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 8px; font: inherit; margin-bottom: 8px; }


/* Dialogs */
.modal { position: fixed; z-index: 60; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 32px);
  overflow-y: auto; background: #1a2410 url("/assets/tex-card.jpg") center / 500px; border: 2px solid var(--wood-edge); border-radius: 8px; padding: 20px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); }
.modal label.field { display: block; margin-top: 10px; }
.modal select, .modal textarea, .modal input { width: 100%; box-sizing: border-box; }
.report-btn { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0 4px; font-size: var(--text-md); }
.report-btn:hover { color: var(--bad-text); }
.danger-zone { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); }

/* Training */
tbody tr.selected td { background: var(--row-hl); }
tbody tr.selected td:first-child { box-shadow: inset 3px 0 var(--accent); }
select.changed { border-color: var(--accent); }
.training-batch select { width: auto; min-width: 0; max-width: 220px; }
.training-batch { flex-wrap: wrap; }
.training-table { table-layout: fixed; width: 100%; }
.training-table :is(th, td) { text-align: center; vertical-align: middle; }
.training-table th.col-fixed-1, .training-table td.player-cell { text-align: left; }
.training-table .training-positions { display: inline-flex; flex-wrap: nowrap; justify-content: center; gap: 4px; }   /* a small gap between two positions, as in the other tables */
.training-table input[type="checkbox"] { width: auto; margin: 0; vertical-align: middle; }
.training-table select { text-align: center; max-width: 9rem; text-overflow: ellipsis; }
/* The long things in the squad table are cut with an ellipsis (the whole text is in the title) so the table fits its card: the player's name and status, the skills that went up or down. */
.training-table :is(th, td) { padding-inline: 8px; }
.training-table .player-cell .name-status { max-width: 16rem; }
.training-table .player-cell .person { display: inline-flex; width: 100%; gap: 8px; }
.training-table .player-cell .avatar { flex: 0 0 auto; --avatar-size: 30px; }
.training-table tbody tr { height: 44px; }
.training-table tbody td { border-bottom: 1px solid rgba(130, 178, 154, 0.1); }
.training-table tbody tr:nth-child(even) td { background: rgba(255, 255, 255, .025); }
.training-table select { min-height: var(--control-h, 36px); padding: 4px 8px; font-size: var(--text-sm); }
.training-table thead th {
  height: 34px;
  background: transparent;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.training-table :is(th, td):nth-child(1) { width: 25%; }
.training-table :is(th, td):nth-child(2) { width: 12%; }
.training-table :is(th, td):nth-child(3) { width: 7%; }
.training-table :is(th, td):nth-child(4) { width: 8%; }
.training-table :is(th, td):nth-child(5) { width: 16%; }
.training-table td.player-cell { width: 25%; }
.training-table .player-cell .person > :last-child { min-width: 0; }
.training-mobile-list { display: none; }
.skill-delta { display: inline-block; max-width: 6.2rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
/* O select dentro de uma celula nao se ajusta ao texto: a regra unica de coluna de controle esta no fim de
   styles-review.css (--control-col em styles/kit.css). */
.training-programs-card table { table-layout: fixed; width: 100%; max-width: 820px; }
.training-programs-card td:first-child { width: 160px; max-width: 180px; text-align: left; padding-left: 8px; white-space: nowrap; }
.training-programs-card td.wrap { text-align: left; padding-left: 16px; color: var(--muted); }

/* Dense management tables (Treino, Liga, Mercado) */
.dense-table-wrap {
  position: relative;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
table.dense-table {
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  font-size: var(--text-sm, 0.8125rem);
}
table.dense-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 34px;
  background: #152414;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.dense-table tbody tr {
  height: 34px;
}
table.dense-table :is(th, td) {
  padding: 4px 6px;
  vertical-align: middle;
}
table.dense-table :is(th, td).num,
table.dense-table :is(th, td).attr-cell {
  width: 44px;
  min-width: 28px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
table.dense-table :is(th, td).skill-col {
  width: 34px;
  min-width: 28px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
table.dense-table :is(th, td).pos-cell,
table.dense-table :is(th, td).pos,
table.dense-table :is(th, td).action-cell {
  width: 38px;
  min-width: 28px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
table.dense-table :is(th, td).score-cell {
  width: 76px;
  min-width: 64px;
  text-align: center;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
table.dense-table thead th.team-name,
table.dense-table tbody td.team-name {
  width: auto;
  text-align: left;
}
table.dense-table thead th.team-home,
table.dense-table tbody td.team-home {
  text-align: left;
}
table.dense-table thead th.team-away,
table.dense-table tbody td.team-away {
  text-align: right;
}
/* The national team's called-up table: the position and star columns were narrower than their content, so the
   badges and stars ran into the age and the club (a two-position player showed "MC OMC 24y" glued together). */
table.dense-table.national-squad-table :is(th, td).pos-cell {
  width: 5.6rem;
}
table.dense-table.national-squad-table :is(th, td).age-cell {
  width: 4.6rem;
  white-space: nowrap;
}
table.dense-table.national-squad-table :is(th, td).rec-cell {
  width: 5rem;
  min-width: 5rem;
  text-align: center;
  white-space: nowrap;
}
table.dense-table.national-squad-table td.team-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 560px) {
  table.dense-table.national-squad-table :is(th, td).age-cell { display: none; }
}
/* Regional teams ranking: four columns fit the card, no sideways scroll, and the coach is just the club's name. */
.national-ranking-card .dense-table-wrap { overflow-x: hidden; }
table.dense-table.national-ranking-table :is(th, td).pos-cell { width: 2rem; }
table.dense-table.national-ranking-table :is(th, td).rank-cell { width: 4rem; }
table.dense-table.national-ranking-table :is(th, td).coach-cell { width: 6rem; }
table.dense-table.national-ranking-table td.team-name,
table.dense-table.national-ranking-table td.coach-cell {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Ranking and coach in the middle of their column, header included (AGENTS.md#Telas; owner, 15/11); only the region's name is on the left. */
.stadium-app .board .main table.dense-table.national-ranking-table :is(th, td):is(.rank-cell, .coach-cell),
table.dense-table.national-ranking-table :is(th, td):is(.rank-cell, .coach-cell) { text-align: center; }
@media (max-width: 560px) {
  table.dense-table.national-ranking-table :is(th, td) { padding-inline: 4px; }
  table.dense-table.national-ranking-table :is(th, td).coach-cell { width: 5.4rem; }
  /* The region's whole name on a phone ("Europa Ocidental", "América Central"): one line from about 400 px; narrower, a long
     name breaks onto a second line instead of ending in "…". */
  table.dense-table.national-ranking-table thead th { font-size: var(--text-xs); letter-spacing: .04em; }
  table.dense-table.national-ranking-table td.team-name { white-space: normal; overflow: visible; text-overflow: clip; }
  table.dense-table.national-ranking-table td.team-name .team-label { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.2; }
}

table.dense-table .crest,
table.dense-table .flag,
.dense-table-wrap .crest,
.dense-table-wrap .flag {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  --s: 24px;
  --flag-w: 24px;
  --flag-h: 16px;
}

table.dense-table .team-with-crest,
table.dense-table .team-with-flag,
.dense-table-wrap .team-with-crest,
.dense-table-wrap .team-with-flag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-width: 0;
  vertical-align: middle;
}

table.dense-table td.team-home .team-with-crest,
table.dense-table td.team-home .team-with-flag,
.dense-table-wrap td.team-home .team-with-crest,
.dense-table-wrap td.team-home .team-with-flag {
  flex-direction: row;
  justify-content: flex-start;
}

table.dense-table td.team-away .team-with-crest,
table.dense-table td.team-away .team-with-flag,
.dense-table-wrap td.team-away .team-with-crest,
.dense-table-wrap td.team-away .team-with-flag {
  flex-direction: row-reverse;
  justify-content: flex-start;
}

table.dense-table .team-with-crest .team-label,
table.dense-table .team-with-flag .team-label,
.dense-table-wrap .team-with-crest .team-label,
.dense-table-wrap .team-with-flag .team-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

table.dense-table td.team-away .team-label,
.dense-table-wrap td.team-away .team-label {
  text-align: right;
}
table.dense-table th.col-fixed-1,
table.dense-table td.col-fixed-1 {
  position: sticky;
  left: 0;
  z-index: 1;
  background: inherit;
  white-space: nowrap;
}
table.dense-table thead th.col-fixed-1 {
  z-index: 3;
  background: #152414;
}
table.dense-table tbody tr:nth-child(odd) td.col-fixed-1 {
  background: var(--row);
}
table.dense-table tbody tr:nth-child(even) td.col-fixed-1 {
  background: var(--row-2);
}
table.dense-table tbody tr.selected td.col-fixed-1,
table.dense-table tbody tr:hover td.col-fixed-1 {
  background: var(--row-hl);
}
/* No shadow between the sticky first column and the rest, in any table of the site. */
table.dense-table .person {
  max-width: 14rem;
}
table.dense-table .person > :last-child {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 760px) {
  table.dense-table .person {
    max-width: 9rem;
  }
}
table.staff-table {
  table-layout: fixed;
  width: 100%;
}
table.staff-table :is(th, td):nth-child(1) { width: 180px; min-width: 160px; }
table.staff-table :is(th, td):nth-child(2) { width: 50px; min-width: 45px; text-align: center; }
table.staff-table :is(th, td):nth-child(n+3):nth-child(-n+9) { width: 44px; min-width: 40px; text-align: center; }
table.staff-table :is(th, td):nth-child(10) { width: 110px; min-width: 95px; text-align: right; }
table.staff-table :is(th, td):nth-child(11) { width: 120px; min-width: 105px; text-align: center; }
table.staff-table :is(th, td):nth-child(12) { width: 80px; min-width: 75px; text-align: center; }
.staff-table .col-fixed-1 {
  min-width: 130px;
  max-width: 200px;
}
@media (max-width: 760px) {
  .staff-table .col-fixed-1 {
    min-width: 110px;
    max-width: 150px;
  }
}

/* Cup layout contract: max-width for match cards, eliminate void between teams and score */
/* Regional cup: the entry, the Status card (with the run inside), the podium and the Upcoming | Results pair are one column with the same edges (1100 px). */
.stadium-app .board .card.cup-entry,
.stadium-app .board .card.cup-strip,
.stadium-app .board .card.cup-podium,
.stadium-app .board .card.cup-page-card,
.stadium-app .board .cup-pair,
.cup-entry,
.cup-strip,
.cup-podium,
.cup-pair,
.cup-page-card {
  max-width: 1100px;
  margin-inline: auto;
}
/* The cup's page heading is in that same column, so the title starts and the Region picker ends on the cards' edges (before, the heading spanned
   the whole 1200/1320 column and stood 78 px out on each side of the 1100 blocks; Gabriel, 14/11/2026). Only a direct child of main: inside the
   card of the inactive state it already follows the card's padding. */
.stadium-app .board .main > .page-heading.cup-head,
.board .main > .page-heading.cup-head {
  max-width: 1100px;
  width: 100%;
  margin-inline: auto !important;   /* the page heading sets its margins with !important (styles-painel-v2.css) */
}
.stadium-app .board .card.intl-ranking-card,
.intl-ranking-card {
  max-width: 680px;
  margin-inline: auto;
}
/* Upcoming matches on the left, results on the right, each as tall as its own list (the results of a round can be long), whenever each gets 22rem (the
   team names stay readable); alone, the results take the whole row; a narrower column (a phone) stacks them: Upcoming, then Results. */
.cup-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: var(--space-4, 16px); align-items: start; margin-top: var(--space-4, 16px); }
.cup-pair:has(> :only-child) { grid-template-columns: minmax(0, 1fr); }
.stadium-app .board .cup-pair > .card { max-width: none; margin: 0; min-width: 0; }
@media (max-width: 760px) { .cup-pair { grid-template-columns: minmax(0, 1fr); } }
/* The run inside the Status card: under its two columns, across the whole card. */
.cup-strip-runs { grid-column: 1 / -1; min-width: 0; padding-top: var(--space-3, 12px); border-top: 1px solid var(--surface-border); }
.intl-ranking-card table.dense-table :is(th, td):last-child {
  width: 120px;
}
.intl-ranking-card table.dense-table {
  table-layout: fixed;
}
.stadium-app .board .card.national-ranking-card table.dense-table :is(th, td):nth-child(3),
.national-ranking-card table.dense-table :is(th, td):nth-child(3) {
  width: 76px;
}

/* Market table layout at 1600px */
table.dense-table.market-table {
  table-layout: fixed;
  width: 100%;
}
table.dense-table.market-table :is(th, td):first-child {
  width: auto;
  min-width: 160px;
}
table.dense-table.market-table :is(th, td):nth-child(2) {
  width: 120px;
  min-width: 120px;
  text-align: center;
  white-space: nowrap;
}
table.dense-table.market-table td:nth-child(2) .market-positions {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 3px;
}
table.dense-table.market-table :is(th, td):nth-child(3) {
  width: 72px;
  min-width: 72px;
  text-align: center;
  white-space: nowrap;
}
table.dense-table.market-table :is(th, td):nth-child(4) {
  width: 54px;
  min-width: 54px;
  text-align: center;
}
table.dense-table.market-table :is(th, td):nth-child(5) {
  width: 72px;
  min-width: 72px;
  text-align: right;
}
table.dense-table.market-table :is(th, td).market-col-seller,
table.dense-table.market-table:not(.market-scouting-table) :is(th, td):nth-child(6) {
  width: 80px;
  max-width: 90px;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
table.dense-table.market-table :is(th, td).market-col-price,
table.dense-table.market-table:not(.market-scouting-table) :is(th, td):nth-child(7) {
  width: 130px;
  min-width: 120px;
  text-align: right;
  white-space: nowrap;
}
table.dense-table.market-table :is(th, td).market-col-bids,
table.dense-table.market-table:not(.market-scouting-table) :is(th, td):nth-child(8) {
  width: 55px;
  min-width: 50px;
  text-align: center;
}
table.dense-table.market-table :is(th, td).market-col-ends,
table.dense-table.market-table:not(.market-scouting-table) :is(th, td):nth-child(9) {
  width: 80px;
  min-width: 75px;
  text-align: right;
  white-space: nowrap;
}
table.dense-table.market-scouting-table :is(th, td).market-col-club,
table.dense-table.market-scouting-table :is(th, td):nth-child(6) {
  width: 200px;
  max-width: 210px;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
table.dense-table.market-scouting-table :is(th, td).market-col-agent-price,
table.dense-table.market-scouting-table :is(th, td):nth-child(7) {
  width: 135px;
  min-width: 125px;
  text-align: right;
  white-space: nowrap;
}
table.dense-table.market-table :is(th, td):last-child {
  width: 115px;
  min-width: 105px;
  text-align: center;
  white-space: nowrap;
}
@media (max-width: 760px) {
  table.dense-table.market-table {
    min-width: 580px;
  }
}
.gm-market-stats.market-strip {
  max-width: 820px;
  margin-inline: auto;
}
.cup-results-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  justify-content: space-between;
  margin-bottom: var(--space-3, 12px);
}
.cup-results-topbar h2 {
  margin: 0;
  white-space: nowrap;
}
.cup-results-topbar select {
  width: auto;
  max-width: min(100%, 16rem);
}

@media (max-width: 760px) {
  .training-table { display: none; }
  .training-mobile-list { display: grid; gap: 8px; padding-bottom: 84px; }
  .training-player-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-sm);
    background: var(--surface-card);
  }
  .training-mobile-player,
  .training-mobile-positions,
  .training-mobile-results { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
  .training-mobile-player .person { display: inline-flex; gap: 8px; min-width: 0; }
  .training-mobile-player .person > :last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .training-mobile-player .avatar { flex: 0 0 auto; --avatar-size: 34px; }
  .training-mobile-age { color: var(--muted); font-size: var(--text-xs); white-space: nowrap; }
  .training-mobile-positions { justify-content: flex-start; }
  .training-mobile-positions .stars { margin-left: auto; }
  .training-mobile-program { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); align-items: center; gap: 8px; color: var(--muted); font-size: var(--text-xs); }
  .training-mobile-program select { width: 100%; min-width: 0; min-height: 38px; }
  .training-mobile-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); color: var(--muted); font-size: var(--text-xs); }
  .training-mobile-results > * { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
/* Page-specific financial details and painted stadium. */
.finance-amount { font-size: var(--text-lg); font-variant-numeric: tabular-nums; }
.cash-flow { display: grid; gap: 10px; margin-top: 18px; }
.cash-flow-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 14px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.cash-flow-row > :last-child { font-variant-numeric: tabular-nums; }
.cash-split { display: grid; gap: 10px; margin: 8px 0 12px; }
.cash-split .cash-available { border-bottom: 0; padding-top: 2px; font-size: var(--text-base); }
.cash-hint { font-size: var(--text-md); margin: 6px 0 0; }
/* Finances: full-width cash overview followed by weekly flow and season ledger. */
.finance-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 18px; align-items: stretch; }
.finance-columns > * { min-width: 0; }
.finance-columns > .fin-cash { grid-column: 1 / -1; }
@media (max-width: 1190px) { .finance-columns { grid-template-columns: minmax(0, 1fr); } }
.academy-upgrade { margin-top: 12px; }
.stadium-art { margin: 18px 0; border: 4px solid var(--wood-edge); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow); }
.stadium-art img { display: block; width: 100%; height: auto; max-height: 480px; object-fit: cover; }
/* Illustrated sponsor combobox. */
.sponsor-contract, .sponsor-new { overflow: visible; }   /* the brand picker's list opens over the card edge */
/* The stadium card rules can set their own overflow; this beats them so the picker's list is never clipped. */
.stadium-app .board .main .sponsor-new { overflow: visible; }
.sponsor-top.grid.cols-2 { align-items: stretch; }   /* contract and goals side by side, both as tall as the taller one */
.deadline-left { color: var(--bad-text); font-weight: 600; }
.sponsor-top .grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }   /* the four goal selects: two above, two below, at every width (auto-fit made four in a row on a wide screen) */
@media (max-width: 760px) { .sponsor-top .grid.cols-2 { grid-template-columns: minmax(0, 1fr); } }
#auto-renew { width: auto; flex: 0 0 auto; }
.sponsor-picker { position: relative; width: 100%; min-width: 0; }
.sponsor-trigger { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: #141c0c; border: 1px solid var(--wood-edge); border-radius: 8px; padding: 8px 12px; cursor: pointer; }
.sponsor-trigger:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sponsor-trigger > span:not(.sponsor-logo) { overflow-wrap: anywhere; }
.sponsor-caret { margin-left: auto; }
.sponsor-logo { display: inline-block; flex: 0 0 60px; width: 60px; height: 60px; border-radius: 8px; background: #e0d1b2 url('/assets/sponsor-logos-guache.webp') 0 0 / 400% 500% no-repeat; }
.sponsor-options { position: absolute; z-index: 45; top: calc(100% + 6px); left: 0; right: 0; margin: 0; padding: 6px; list-style: none; max-height: min(420px, 55vh); overflow-y: auto; border: 2px solid var(--wood-edge); border-radius: 8px; background: #1a2410; box-shadow: var(--shadow); }
.sponsor-options[hidden] { display: none; }
.sponsor-option { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: var(--radius-sm); cursor: pointer; overflow-wrap: anywhere; }
.sponsor-option.highlighted, .sponsor-option:hover { background: var(--panel-2); }
.sponsor-option[aria-selected="true"] { box-shadow: inset 3px 0 var(--accent); }
.sponsor-current { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }


/* Stat Cards & Outcome Badges */
.stat-card { display: flex; flex-direction: column; }
.stat-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.stat-header h3 { margin: 0; }
.stat-footer { margin: 6px 0 0; font-size: var(--text-sm); color: var(--muted); }

.outcome-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 25px; height: 25px; border-radius: 999px;
  font-family: var(--font-ui); font-weight: 800; font-size: var(--text-xs);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}
.outcome-badge.win { background: #2f6b28; color: #d4ffd0; border: 1px solid var(--good); }
.outcome-badge.draw { background: #5c4416; color: #ffebaa; border: 1px solid var(--warn); }
.outcome-badge.loss { background: #61221b; color: #ffd2cb; border: 1px solid var(--bad); }
.outcome-badge.pending { visibility: hidden; }   /* a match on air: no letter yet, the cell keeps the columns */
.placar-box { font-weight: 800; color: #fff6dc; }

/* Stadium Hero Card */
.stadium-hero-card {
  border-radius: 8px;
  border: 3px solid var(--wood-dark);
  box-shadow: 0 0 0 2px rgba(168, 132, 63, 0.55), 0 10px 28px rgba(0, 0, 0, 0.55);
  position: relative; overflow: hidden;
}
.stadium-hero-media { position: relative; width: 100%; overflow: hidden; }
.stadium-hero-media > img { width: 100%; height: auto; max-height: 380px; object-fit: cover; display: block; }
.stadium-hero-media > img[hidden] { display: none; }
/* The canvas: the one box of the complex. As wide as the card but never taller than the window (the whole picture stays visible, without crop),
   centred when the window is the limit; the scene fills it and the layer of buttons covers exactly the same area. */
.stadium-canvas { position: relative; width: min(100%, calc((100vh - 130px) * 16 / 9)); min-width: min(100%, 320px); margin-inline: auto; }
.stadium-canvas[hidden] { display: none; }
/* The layered complex: a 16:9 box that keeps its place from the first paint; each layer sits at its rectangle of the canvas (percentages). */
.aerial { position: relative; width: 100%; aspect-ratio: var(--ratio, 16 / 9); overflow: hidden; }
.aerial img { position: absolute; display: block; max-width: none; }
.aerial-base { inset: 0; width: 100%; height: 100%; object-fit: cover; }
.aerial-layer { left: calc(var(--x) * 1%); top: calc(var(--y) * 1%); width: calc(var(--w) * 1%); height: calc(var(--h) * 1%); }
/* The name, the seats and the works above the picture (nothing is drawn over the art). */
.stadium-hero-caption { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 18px; padding: 12px 16px; background: rgba(20, 16, 8, 0.55); border-bottom: 1px solid rgba(168, 132, 63, 0.35); }
.stadium-hero-caption h2 { margin: 0; color: #fff6dc; }
.stadium-hero-caption p { margin: 0; }
/* The facilities as buttons over the picture: a layer the size of the scene, each button at its rectangle (percentages of the canvas). Transparent until
   hovered or focused; then a thin edge and a light tint (the art stays visible) and the label "Name · Level". */
.hotspots { position: absolute; inset: 0; z-index: 3; }
.hotspot { position: relative; font: inherit; color: #fff6dc; background: transparent; cursor: pointer; padding: 0; }
.hotspot.on-image { position: absolute; left: calc(var(--x) * 1%); top: calc(var(--y) * 1%); width: calc(var(--w) * 1%); height: calc(var(--h) * 1%); border: 2px solid transparent; border-radius: var(--radius-md); transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  /* The aura that says "clickable": a thin white ring with a dark hairline outside it (so it reads on light grass and road as well as on dark ground) and a soft white halo. Nothing inside the area: the art stays clean. */
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.6), 0 0 0 2px rgba(20, 16, 8, 0.32), 0 0 18px 4px rgba(255, 255, 255, 0.34); }
.hotspot.on-image:hover, .hotspot.on-image:focus-visible { border-color: var(--accent-light); background: rgba(245, 214, 138, 0.12); box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.95), 0 0 0 3px rgba(20, 16, 8, 0.4), 0 0 30px 9px rgba(255, 255, 255, 0.5); }
.hotspot:focus-visible { outline: 3px solid var(--accent-light); outline-offset: 2px; }
.hotspot-label { padding: 3px 10px; border: 1px solid var(--accent); border-radius: 999px; background: rgba(20, 16, 8, 0.9); color: #fff6dc; font-size: var(--text-sm); line-height: 1.25; text-shadow: none; }
.hotspot.on-image .hotspot-label { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: max-content; max-width: 96%; text-align: center; opacity: 0; pointer-events: none; transition: opacity 0.15s ease; }
.hotspot.on-image:hover .hotspot-label, .hotspot.on-image:focus-visible .hotspot-label, .hotspot.on-image.building .hotspot-label { opacity: 1; }
.hotspot.building { border-style: dashed; border-color: var(--warn); background: rgba(236, 170, 69, 0.14); }
.hotspot-site { position: absolute; left: 6px; top: 6px; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: var(--warn); color: var(--color-accent-ink); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6); }
/* The facilities with no rectangle (irrigation and heating act on the pitch), and all of them when there is no art: a compact row under the picture. */
.facility-extras { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px; border-top: 1px solid rgba(168, 132, 63, 0.35); }
.facility-extras:empty { display: none; }
@media (min-width: 761px) { .facility-extras.on-picture { display: none; } }   /* every button is on the picture: the row under it is for phones only */
.hotspot.compact { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 8px; background: rgba(20, 28, 12, 0.5); }
.hotspot.compact:hover { border-color: var(--accent-light); background: rgba(245, 214, 138, 0.12); }
.hotspot.compact .hotspot-label { position: static; padding: 0; border: 0; background: none; font-size: var(--text-md); }
.hotspot.compact.building { border-style: dashed; }
.hotspot.compact .hotspot-site { position: static; width: 26px; height: 26px; flex: none; }
.hotspot.compact .hotspot-site svg { width: 18px; height: 18px; }
/* Phones and touch screens have no hover: the picture shows a small level badge on each facility (a tap opens the dialog) and the full "Name · Level"
   lines are in the list under it. */
.hotspot-tag { display: none; }
.hotspot.compact.mobile-only { display: none; }
.facility-extras.no-art .hotspot.compact.mobile-only { display: inline-flex; }
@media (max-width: 760px), (hover: none) {
  .hotspot.on-image .hotspot-label { display: none; }
  .hotspot.on-image { border-color: rgba(245, 214, 138, 0.35); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.6), 0 0 0 2px rgba(20, 16, 8, 0.32), 0 0 9px 2px rgba(255, 255, 255, 0.3); }
  .hotspot.on-image .hotspot-tag { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: inline-flex; flex-direction: column; align-items: center; max-width: 100%; padding: 1px 2px; border-radius: var(--radius-sm); border: 1px solid var(--accent); background: rgba(20, 16, 8, 0.92); color: #fff6dc; line-height: 1.1; text-align: center; pointer-events: none; }
  .hotspot.on-image .hotspot-tag b { font-size: var(--text-xs); font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .hotspot.on-image .hotspot-tag small { font-size: var(--text-xs); color: var(--accent-light); white-space: nowrap; }
  .hotspot.compact.mobile-only { display: inline-flex; }
  .hotspot-site { width: 22px; height: 22px; left: 3px; top: 3px; }
  .hotspot-site svg { width: 16px; height: 16px; }
}
.stadium-hero-badge { display: flex; align-items: center; gap: 6px; }
.stadium-rename { pointer-events: auto; min-height: 0; padding: 2px 8px; font-size: var(--text-xs); line-height: 1.4; }
.club-stadium { margin: 2px 0 0; color: var(--accent); font-weight: 600; }
.seats-building { display: grid; gap: 4px; margin: 4px 0 8px; font-size: var(--text-md); }
.seats-progress { display: block; width: 100%; height: 14px; margin: 6px 0 10px; accent-color: var(--accent); }
.seats-reduce { margin-top: 8px; }
/* The bowl: the same kind of button as a facility, with a quieter standing aura (the rest of the rules are the facilities'). */
.hotspot.bowl.on-image { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.4), 0 0 0 2px rgba(20, 16, 8, 0.22), 0 0 14px 3px rgba(255, 255, 255, 0.2); }
.hotspot.bowl.on-image:hover, .hotspot.bowl.on-image:focus-visible { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.95), 0 0 0 3px rgba(20, 16, 8, 0.4), 0 0 30px 9px rgba(255, 255, 255, 0.5); }


/* Novidades / Changelog */
.site-footer { display: flex; justify-content: center; gap: 10px; }
.novidades-link { position: relative; display: inline-flex; align-items: center; gap: 6px; }
.novidades-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 6px var(--good);
  flex-shrink: 0;
}
.changelog-container {
  max-width: 760px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.changelog-header {
  margin-bottom: 4px;
}
.changelog-header h1 {
  margin: 0 0 6px;
  font-size: var(--text-xl);
  color: var(--text);
}
.changelog-header p.muted {
  margin: 0;
  font-size: var(--text-base);
  color: var(--muted);
}
.changelog-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.changelog-date-heading {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--accent);
  margin: 14px 0 2px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line);
  text-transform: capitalize;
}
.changelog-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.changelog-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  border-radius: var(--radius);
}
.changelog-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.changelog-card-title {
  margin: 0;
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text);
}
.changelog-card-text {
  margin: 0;
  font-size: var(--text-md);
  line-height: 1.5;
  color: var(--text);
  opacity: 0.92;
}
.changelog-actions {
  margin-top: 10px;
  display: flex;
}
@media (max-width: 760px) {
  .changelog-container { gap: 12px; }
  .changelog-header h1 { font-size: var(--text-lg); }
  .changelog-card { padding: 12px 14px; }
  .changelog-card-title { font-size: var(--text-md); }
  .changelog-card-text { font-size: var(--text-md); }
}

/* --- Dashboard: next match, result rows ---------------------------------------------------------- */
.stack-page > * + *, .main > .card + .card, .main > .card + section, .main > section + section, .main > section + .card { margin-top: 16px; }
.next-match-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 10px; }
.next-match-head h2 { margin: 0; }
.next-match-when { margin: 0 0 6px; font-size: var(--text-md); overflow-wrap: anywhere; }
.next-match-teams { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: start; gap: 12px; text-align: center; padding: 6px 0 14px; }
.next-team { font-size: var(--text-lg); font-weight: 700; overflow-wrap: anywhere; }
.next-team .muted { font-size: var(--text-md); font-weight: 400; }
.next-vs { font-size: var(--text-base); color: var(--muted); align-self: center; }
.next-match-actions { align-items: center; justify-content: center; }
.start-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; border-color: var(--accent); }
.start-card h2 { margin: 0 0 4px; }
.start-card p { margin: 0; }
.start-link { text-align: center; margin-top: 16px; font-size: var(--text-md); }
.club-link { color: inherit; text-decoration: underline; text-decoration-color: rgba(226, 182, 90, 0.55); text-underline-offset: 3px; }
.club-link:hover, .club-link:focus-visible { color: var(--accent-light); }
.club-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
.news-more { flex: none; white-space: nowrap; font-size: var(--text-md); }
a.placar-box { color: inherit; text-decoration: none; }
a.placar-box:hover { text-decoration: underline; }
.me-name { color: var(--accent-light); }
.results { display: grid; gap: 6px; }
.result-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 8px 10px; border-radius: 8px; background: rgba(0, 0, 0, 0.18); color: var(--text); text-decoration: none; }
.result-row:hover { background: rgba(0, 0, 0, 0.3); }
/* A match row: [name] [crest] [score] [crest] [name]. Names hug their crest (12 px), crests hug the score (7 px): the same on both sides. */
.result-teams { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto minmax(0, 1fr); align-items: center; column-gap: 0; flex: 1 1 16rem; min-width: 0; }
.rt-name-home { justify-self: end; text-align: right; }
.rt-name-away { justify-self: start; text-align: left; }
.rt-mark { display: flex; }
.rt-mark-home { margin-left: 12px; }
.rt-mark-away { margin-right: 12px; }
.result-mid { margin: 0 7px; text-align: center; white-space: nowrap; align-self: center; }
.result-pens { display: block; font-size: var(--text-xs); }
.stat-header a.muted { font-size: var(--text-sm); }
.stat-header a.muted:hover { color: var(--text); }

/* --- Player drawer -------------------------------------------------------------------------------- */
.mini-stats { margin: 10px 0 14px; }
/* The drawer chips (Fatigue, Wage): the content in the middle of the chip, and the fatigue in the chip's own size; it was 12 px on the
   text baseline, 13 px from the top and 8 from the bottom, beside a 14 px Wage (owner, 15/11). */
.mini-stats .chip:has(> .fatigue-meter) { display: inline-flex; align-items: center; }
.mini-stats .chip .fatigue-meter { font-size: inherit; }
.drawer-sep { border: 0; border-top: 1px dashed rgba(168, 132, 63, 0.35); margin: 18px 0 4px; }
.drawer select, .squad-training-select { width: auto; max-width: min(100%, 22rem); min-height: 40px; }

/* --- Money dialog ---------------------------------------------------------------------------------- */
.money-preview { margin: 6px 0 0; font-weight: 700; color: var(--accent-light); min-height: 1.4em; }
.money-preview.bad { color: var(--bad-text); }

/* Character portraits (src/avatar.mjs): guache layers stacked over a parchment disc. */
.avatar { position: relative; display: inline-block; flex: none; width: var(--avatar-size); height: var(--avatar-size); overflow: hidden; vertical-align: middle;
  border-radius: 50%; border: 1px solid var(--wood-edge);
  /* --avatar-bg (src/position-color.mjs) is the player's position colour; without it, the parchment disc. A soft highlight sits on top either way. */
  background: radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0) 70%), var(--avatar-bg, linear-gradient(#efe2bf, #cdb98a)); }
.avatar-busto { border-radius: var(--radius); border-width: 2px; }
.avatar-stack { position: absolute; display: block; }
/* The portrait art covers most of the disc, so the position colour also shows as a ring over its edge (the same colour, never the whole row). */
.avatar[style*="--avatar-bg"]::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: inset 0 0 0 max(3px, 9%) var(--avatar-bg); }
.avatar-stack img { position: absolute; display: block; max-width: none; user-select: none; pointer-events: none; }
/* A name with its status icons: always one line, the icons on the right with a fixed gap, only the name gives way (ellipsis). */
.name-status { display: flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%; }
.name-status-text { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-icons { flex: none; display: inline-flex; align-items: center; gap: 4px; line-height: 1; }
.status-icon { flex: none; font-weight: 700; font-size: 0.95em; line-height: 1; }
.status-icon.injury { color: var(--bad); } .status-icon.banned { color: var(--warn); }
.slot .label .name-status, .bench-slot .name-status { justify-content: center; }
.person { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
/* In a table cell the photo and name sit on the line of text, which adds the descender room under them and leaves the photo
   about 3 px above the row's centre (owner's request, 15/11). Middle alignment centres it in every table. */
td .person { vertical-align: middle; }
.person > :last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.profile-head { display: flex; align-items: center; gap: 18px; }
.profile-head h1, .profile-head h2 { margin: 0; }
@media (max-width: 560px) { .profile-head { gap: 12px; } .profile-head .avatar-busto { --avatar-size: 96px !important; } }

/* --- Club crest (component) and the crest editor ------------------------------------------------------------ */
/* Every crest sits in the SAME square box whatever it shows (a 512x512 PNG or the generated shield), so names line up. Phones scale
   all boxes by the same factor (--crest-k), never to another shape. */
:root { --crest-k: 1; }
.crest { --box: calc(var(--s, 34px) * var(--crest-k)); display: inline-flex; flex: none; align-items: center; justify-content: center; width: var(--box); height: var(--box); vertical-align: middle; }
.crest-xs { --s: 22px; } .crest-sm { --s: 34px; } .crest-md { --s: 46px; } .crest-lg { --s: 84px; } .crest-xl { --s: 96px; }
.crest-img { display: block; width: 100%; height: 100%; object-fit: contain; }
/* The generated shield fills about what a drawn crest does inside its square (a 512 px PNG keeps margins around the shield). */
.crest-fallback { display: flex; align-items: center; justify-content: center; width: 72%; height: 84%; color: var(--crest-ink, #fff); font-weight: 700; line-height: 1; letter-spacing: 0.02em; font-size: calc(var(--box) * 0.27);
  background: var(--crest-bg, #8d8d8d); clip-path: polygon(0 0, 100% 0, 100% 58%, 50% 100%, 0 58%); padding-bottom: 12%; }
.crest-xs .crest-fallback { font-size: 0; }
.team-with-crest { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; vertical-align: middle; }
/* Nation flags (3:2). The box is reserved from the first paint; a missing SVG becomes a badge with the country code in the same box. */
.flag { position: relative; display: inline-flex; flex: none; align-items: center; justify-content: center; width: var(--flag-w, 24px); height: var(--flag-h, 16px); vertical-align: middle;
  border-radius: 3px; overflow: hidden; background: rgba(0, 0, 0, 0.25); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35); }
/* The hairline border is drawn over the picture, so the picture keeps the exact 3:2 box. */
.flag::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28); pointer-events: none; }
.flag-img { display: block; width: 100%; height: 100%; object-fit: contain; }
.flag-fallback { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: var(--text); font-weight: 700; line-height: 1; letter-spacing: 0.02em;
  font-size: max(8px, calc(var(--flag-h, 16px) * 0.5)); background: rgba(255, 255, 255, 0.1); }
/* Region choice (sign-up): native radios laid over their cards, at least 44 px tall, one or two columns. */
.region-picker { border: 0; padding: 0; margin: 0 0 12px; min-width: 0; }
.region-picker legend { padding: 0; margin-bottom: 4px; font-weight: 600; }
.region-help { margin: 0 0 8px; font-size: var(--text-md); }
.region-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.region-option { position: relative; display: block; }
.region-radio { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.region-card { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: rgba(20, 28, 12, 0.5); }
.region-name { min-width: 0; overflow-wrap: anywhere; line-height: 1.2; }
.region-radio:checked + .region-card { border-color: var(--accent-light); background: rgba(120, 160, 40, 0.25); box-shadow: inset 0 0 0 1px var(--accent-light); }
.region-radio:focus-visible + .region-card { outline: 3px solid var(--accent-light); outline-offset: 2px; }
.region-option:hover .region-card { border-color: var(--accent-light); }
.region-error:empty { display: none; }
.verify-resend { display: grid; gap: 8px; justify-items: center; margin: 12px 0; }
.verify-resend .btn { justify-self: start; }
.verify-status:empty { display: none; }
.verify-status { text-align: center; margin: 0; }
.verify-inline { margin-top: 4px; }
.team-with-flag { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; vertical-align: middle; }
.page-title-flag { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.page-title-flag h1 { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.team-label { min-width: 0; overflow-wrap: anywhere; }
/* In tables and match rows a long name takes at most two lines, so rows keep one height whatever the crest or the name. */
.club-list .team-label, .result-teams .team-label, .team-with-flag .team-label { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* A flag's name breaks between words (never inside one); in a scrolling table-wrap it stays on one line and the table scrolls, as every team column does. */
.team-with-flag .team-label { white-space: normal; overflow-wrap: break-word; }
.table-wrap .team-with-flag .team-label { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }   /* corta dentro da coluna em vez de vazar sobre a vizinha */
.next-team .team-with-crest { flex-direction: column; gap: 8px; }
.scoreboard .team { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.scoreboard > :nth-child(2) { align-self: center; }
@media (max-width: 560px) {
  :root { --crest-k: 0.8; }   /* phones: every box shrinks by the same factor, staying square */
  /* Phones keep the one-line row of wide screens, [name] [crest] [score] [crest] [name]: the crests and the score share one axis (centred on the
     row) and a long name takes up to two lines beside them without moving them. Tighter gaps and a slightly smaller name give it the room. */
  .result-row { gap: 6px 8px; }
  .result-teams { flex: 1 1 100%; }
  .result-teams .team-label { font-size: var(--text-md); line-height: 1.25; overflow-wrap: break-word; hyphens: auto; }
  .rt-mark-home { margin-left: 8px; }
  .rt-mark-away { margin-right: 8px; }
  .result-mid { margin: 0 6px; }
}
.club-head { display: flex; align-items: center; gap: 16px; min-width: 0; }
.crest-account { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
/* Account (2026-11-12): the crest and shirt card with the friends card on its right; one column below 900px. The friends
   card brings its own top margin and width inline (friends.mjs), which the pair overrides. */
.account-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4, 16px); align-items: start; margin-top: var(--space-4, 16px); max-width: 78rem; }
.account-pair > .card { margin: 0 !important; max-width: none !important; }
@media (max-width: 900px) { .account-pair { grid-template-columns: minmax(0, 1fr); max-width: 38rem; } }
.search-option { flex-direction: row; align-items: center; gap: 10px; min-height: 46px; }
.search-text { display: flex; flex-direction: column; min-width: 0; }

.crest-landing-now { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.crest-final { display: block; width: min(256px, 100%); height: auto; background: var(--crest-paper); border: 2px solid var(--wood-edge); border-radius: 8px; padding: 8px; }
.crest-price b { color: var(--accent-light); }
.warn-text { color: var(--warn); }
/* One screen: the tabs replace the four steps, so a drawing, its shapes, its letters and its colours are always one touch apart. */
.crest-tabs { display: flex; gap: 6px; margin: 0 0 10px; padding: 0; overflow-x: auto; }
.crest-tab { flex: 1 0 auto; min-height: 44px; padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--radius-md); background: transparent; color: var(--muted); font: inherit; font-size: var(--text-md); font-weight: 600; cursor: pointer; white-space: nowrap; }
.crest-tab:hover { color: var(--text); border-color: var(--accent-light); }
.crest-tab[aria-selected="true"] { background: var(--accent); color: #1a1208; border-color: var(--accent); }
.crest-tab:focus-visible, .crest-mode:focus-visible, .crest-font:focus-visible { outline: 3px solid var(--accent-light); outline-offset: 2px; }
/* Quick colour targets: one row above the palette; the chosen one takes the lime, and a target that cannot be painted is off. */
.crest-targets { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.crest-target { min-height: 40px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: rgba(0, 0, 0, 0.22); color: var(--muted); font: inherit; font-size: var(--text-sm); font-weight: 600; white-space: nowrap; cursor: pointer; }
.crest-target:hover:not(:disabled) { color: var(--text); border-color: var(--accent-light); }
.crest-target[aria-checked="true"] { background: var(--accent); color: #1a1208; border-color: var(--accent); }
.crest-target:disabled { opacity: 0.45; cursor: not-allowed; }
.crest-target:focus-visible { outline: 3px solid var(--accent-light); outline-offset: 2px; }
/* What a touch on the drawing does: move the pieces, or pour the bucket. */
.crest-modes { position: absolute; z-index: 5; top: 8px; left: 8px; display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(8, 24, 22, 0.82); border: 1px solid var(--wood-edge); }
.crest-mode { min-height: 32px; padding: 4px 12px; border: 1px solid transparent; border-radius: 999px; background: transparent; color: #e8f3e4; font: inherit; font-size: var(--text-xs); font-weight: 700; cursor: pointer; }
.crest-mode[aria-pressed="true"] { background: var(--accent); color: #1a1208; }
/* The font picker: every style written in its own typeface, with the typed name under it. */
.crest-fonts { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: 6px; margin: 8px 0; }
.crest-font { min-height: 44px; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--radius-md); background: rgba(0, 0, 0, 0.22); color: var(--text); cursor: pointer; text-align: center; }
.crest-font[aria-checked="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, transparent); }
.crest-font-name { display: block; font-size: var(--text-base); line-height: 1.25; overflow-wrap: anywhere; }
.crest-font-sample { margin: 0 0 8px; min-height: 2.4em; padding: 6px 10px; border-left: 3px solid var(--accent); background: rgba(0, 0, 0, 0.22); font-size: var(--text-xl); line-height: 1.2; color: var(--text); overflow-wrap: anywhere; }
.crest-layout { display: grid; grid-template-columns: minmax(0, 512px) minmax(0, 1fr); gap: 16px; align-items: start; margin-top: 8px; }
.crest-layout > * { min-width: 0; }
.crest-stage { position: relative; width: 100%; max-width: 512px; aspect-ratio: 1; background: var(--crest-paper); border: 2px solid var(--wood-edge); border-radius: 8px; overflow: hidden; }
.crest-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.crest-overlay { touch-action: auto; }
.crest-overlay.draggable { touch-action: none; cursor: grab; }
.crest-overlay.bucket { cursor: crosshair; }
.crest-overlay:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.crest-grid { display: grid; gap: var(--space-2, 8px); margin-top: var(--space-2, 8px); }
.crest-grid-outlines { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
.crest-grid-shapes { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); max-height: 17rem; overflow-y: auto; padding: 2px; }
.crest-thumb { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px; min-height: 44px; min-width: 44px; background: var(--crest-paper); color: var(--crest-ink); border: 2px solid var(--wood-edge); border-radius: 8px; cursor: pointer; }
.crest-thumb img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.crest-thumb-name { font-size: var(--text-xs); line-height: 1.2; text-align: center; }
.crest-thumb[aria-pressed="true"] { outline: 3px solid var(--accent); }
.crest-thumb:disabled { opacity: 0.45; cursor: not-allowed; }
.crest-thumb:focus-visible, .crest-swatch:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.crest-placed { margin: var(--space-2, 8px) 0; min-height: 2rem; }
.crest-placed button[aria-pressed="true"] { outline: 2px solid var(--accent); }
.crest-palette { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-2, 8px); margin-bottom: 10px; }
.crest-swatch { aspect-ratio: 1; min-height: 44px; min-width: 44px; background-color: var(--swatch); background-image: url('/assets/crest/guache-fosco-tile.webp'); background-size: 104px 104px; background-blend-mode: soft-light; border: 2px solid rgba(0, 0, 0, 0.55); border-radius: 8px; cursor: pointer; }   /* the same colours, with the gouache grain over them (soft-light: neutral at 128) */
.crest-swatch[aria-checked="true"] { outline: 3px solid var(--accent); outline-offset: 2px; box-shadow: 0 0 0 5px #fff6dc inset; }
.crest-nav { margin-top: var(--space-4, 16px); }
@media (max-width: 900px) { .crest-layout { grid-template-columns: minmax(0, 1fr); } .crest-stage { margin-inline: auto; } }

/* PT | EN segmented control: two 44 px touch targets, the current language filled. */
/* EN | PT: forma e cor numa regra so, em styles/kit.css (Gabriel, 18/11/2026). Aqui fica so o tamanho de toque. */
.lang-btn { min-width: 44px; min-height: 44px; padding: 0 12px; font: inherit; font-weight: 700; letter-spacing: 0.04em; cursor: pointer; }

/* Modern Tactical Pitch — the club dashboard is the tactical home screen. */
.dashboard { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--space-4); align-content: start; }
.dashboard > .start-card { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); }
.dashboard > .start-card .start-card-text { min-width: 0; }
.dashboard > .start-card .chips { flex-shrink: 0; }
.dashboard > .dash-matchday { grid-column: span 8; min-height: 250px; display: flex; flex-direction: column; justify-content: center; padding: var(--space-6); border-color: color-mix(in srgb, var(--accent) 45%, #3d3c1c); background:
  linear-gradient(90deg, rgba(16, 24, 9, 0.96) 8%, rgba(16, 24, 9, 0.78) 58%, rgba(16, 24, 9, 0.58)),
  url('/assets/estadio-ilustrado.jpg') center 46% / cover,
  var(--panel); }
.dashboard .next-match-head { margin-bottom: var(--space-4); }
.dashboard .next-match-head h2 { font-size: clamp(1.25rem, 1.1rem + 0.65vw, 1.7rem); }
.dashboard .next-match-when { display: inline-flex; align-self: flex-start; margin: 0 0 var(--space-2); padding: var(--space-1) var(--space-3); border: 1px solid rgba(245, 214, 138, 0.45); border-radius: 999px; background: rgba(20, 28, 12, 0.7); }
.dashboard .next-match-teams { align-items: center; gap: var(--space-4); padding: var(--space-2) 0 var(--space-4); }
.dashboard .next-team { font-size: clamp(1.15rem, 1rem + 0.65vw, 1.7rem); }
.dashboard .next-team .team-with-crest { justify-content: center; }
.dashboard .next-match-actions { justify-content: flex-start; }
.dashboard > .dash-metrics { grid-column: span 4; grid-template-columns: 1fr; gap: var(--space-2); }
.dashboard .stat-card { justify-content: center; padding: var(--space-3) var(--space-4); }
.dashboard .stat-header { margin-bottom: var(--space-1); }
.dashboard .stat { font-size: clamp(1.4rem, 1.2rem + 0.75vw, 1.9rem); line-height: 1.1; }
.dashboard .stat-footer { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-2); margin: var(--space-1) 0 0; font-size: var(--text-xs); }
.dashboard > .dash-matches { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
.dashboard .dash-matches > .card { padding: var(--space-3); }
/* The end of the page: the news (left) and the squad's best (right), tops aligned, each as tall as its own content. */
.dashboard > .dash-bottom { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: var(--space-3); }
.dashboard > .start-link { grid-column: 1 / -1; }
/* Squad highlights: Name | Pos | Rec. Fixed columns for Pos and Rec, so a long name is cut with an ellipsis instead of pushing them. */
.dash-squad table { width: 100%; table-layout: fixed; }
.dash-squad th:nth-child(2), .dash-squad td:nth-child(2) { width: 4.75rem; text-align: center; }
.dash-squad th:nth-child(3), .dash-squad td:nth-child(3) { width: 6.5rem; }
.dash-squad .squad-name { overflow: hidden; }
.dash-squad .squad-name .person { max-width: 100%; }
.dash-squad .squad-name .person > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard .result-row { min-width: 0; }
@media (max-width: 760px) {
  .dashboard > .start-card { flex-direction: column; align-items: stretch; }
  .dashboard > .start-card .chips { flex-wrap: wrap; }
  .dashboard { grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }
  .dashboard > .dash-matchday, .dashboard > .dash-metrics, .dashboard > .dash-bottom,
  .dashboard > .dash-matches { grid-column: 1; }
  .dashboard > .dash-bottom { grid-template-columns: minmax(0, 1fr); }   /* news first, then the squad */
  .dashboard > .dash-matchday { min-height: 220px; padding: var(--space-4); }
  .dashboard > .dash-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dashboard .stat-card { padding: var(--space-2); }
  .dashboard .stat-header { display: block; }
  .dashboard .stat-header a { display: inline-block; margin-top: var(--space-1); }
  .dashboard > .dash-matches { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .dashboard > .dash-metrics { grid-template-columns: minmax(0, 1fr); }
  .dashboard .stat-card { padding: var(--space-3); }
  /* Phones: tighter cells and narrower Pos / Rec columns, so the three columns fit a 360-390 px card without sideways scrolling. */
  .dash-squad :is(th, td) { padding-inline: 6px; }
  .dash-squad th:nth-child(2), .dash-squad td:nth-child(2) { width: 3.25rem; }
  .dash-squad th:nth-child(3), .dash-squad td:nth-child(3) { width: 4.6rem; }
  .dash-squad .stars { font-size: 0.85em; }
  /* Both crests on the same top line whatever the length of the names (centring each team made a two-line name push its crest down). */
  .dashboard .next-match-teams { gap: var(--space-2); align-items: start; }
  .dashboard .next-vs { align-self: start; padding-top: 1.25rem; }
  .dashboard .next-team { font-size: var(--text-base); }
}
.auth .lang-switch { display: flex; width: max-content; margin: 12px auto 0; }
/* Footer: the language switch sits exactly in the middle, Privacy to its left and What's new to its right. */
.site-footer { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; column-gap: 14px; }
.site-footer > a:first-child { justify-self: end; }
.site-footer > .novidades-link { justify-self: start; }
.site-footer > .lang-switch { justify-self: center; }
.site-footer { padding: 4px 12px; background: rgba(0, 0, 0, 0.5); border-radius: var(--radius-md); }   /* the links sit on the busy background: a dark strip keeps them readable */
.site-footer a { color: var(--text); opacity: 0.85; }

/* Squad: the wage bill next to the filter tabs. */
.gm-metric.squad-wage { display: flex; flex-wrap: nowrap; align-items: baseline; gap: 0.6rem; width: fit-content; max-width: 100%; }   /* Wage, the amount and /week on one line */
.squad-wage .gm-metric-label, .squad-wage small { white-space: nowrap; }
.gm-squad > h1 { margin: 0 0 var(--space-3, 12px); }
.youth-prefs { align-items: flex-end; }
.youth-prefs .field { margin-bottom: 0; }

/* --- Live broadcast of a match (#/partida/<id>/ao-vivo) ------------------------------------------------------------------ */
.live-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 12px; }
.live-top h1 { margin: 0; }
.live-board { display: grid; gap: 14px; }
/* Wide screens: the board (score, clock, controls) on the left and the list of events beside it, both in view; narrower: one under the other. */
.live-layout { display: grid; gap: 14px; align-items: start; }
/* The scoreboard and, under it, the statistics counted up to the clock's minute. */
.live-side { display: grid; gap: 14px; align-content: start; min-width: 0; }
.live-stats h2 { font-size: var(--text-base); margin: 0 0 10px; }
.live-stats .live-stat-label { text-align: center; font-size: var(--text-md); }
.live-stats .bar-row .num:last-child { text-align: right; }
.live-stats .bar span { transition: width 0.4s ease; }
@media (prefers-reduced-motion: reduce) { .live-stats .bar span { transition: none; } }
@media (min-width: 1000px) { .live-layout { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } .live-feed-card { margin-top: 0; } .live-feed { max-height: min(68vh, 620px); min-height: 360px; } }
.live-scoreline { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 10px; }
.live-team { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; text-align: center; }
.live-team-name { display: block; width: 100%; max-width: 100%; overflow: hidden; contain: inline-size; font-weight: 700; font-size: var(--text-base); text-overflow: ellipsis; white-space: nowrap; }   /* one line: a long name is cut, both sides stay level */
/* The shirt beside the crest on the live scoreboard, the same size as the crest. --live-mark follows the scoreboard's width (two marks
   per side beside the score), up to the crest's usual 84px, so both sides always fit, from a phone to the wide layout. */
.live-scoreline { container-type: inline-size; }
/* Registered as a length so it is resolved on .live-team (against the scoreline) and passed down as pixels: the crest is a container
   itself, and an unresolved 100cqw would be read against the crest's own width. */
@property --live-mark { syntax: '<length>'; inherits: true; initial-value: 84px; }
.live-team { --live-mark: clamp(28px, calc((100cqw - 150px) / 4), 84px); }
.live-team .crest-lg { --s: var(--live-mark); flex: none; }
.live-team .kit-mark-lg { width: calc(var(--live-mark) * var(--crest-k)); height: calc(var(--live-mark) * var(--crest-k)); }   /* the crest's own phone factor too */
.live-center { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 7.5rem; }
.live-clock { font-size: var(--text-lg); font-weight: 800; line-height: 1.05; color: var(--accent); font-variant-numeric: tabular-nums; }
.live-score { display: flex; align-items: baseline; gap: 0.4rem; font-size: var(--text-2xl); font-weight: 800; line-height: 1.05; font-variant-numeric: tabular-nums; color: #fff6dc; }
.live-dash { color: var(--muted); font-weight: 400; }
.live-status { padding: 2px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: var(--text-sm); color: var(--muted); }
.live-status.live { color: #ffb0a0; border-color: #c4544a; }
.live-status.live::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: #e0443a; vertical-align: 0.05em; animation: live-dot 1.4s ease-in-out infinite; }
.live-status.end { color: var(--accent-light); border-color: var(--accent); }
@keyframes live-dot { 50% { opacity: 0.25; } }
.live-bar { padding: 0 2px; min-height: 44px; display: flex; align-items: center; }
.live-progress { width: 100%; height: 44px; min-height: 44px; margin: 0; padding: 0; background: transparent; cursor: pointer; -webkit-appearance: none; appearance: none; }
.live-progress::-webkit-slider-runnable-track { height: 8px; border-radius: 999px; background: linear-gradient(to right, var(--accent) var(--p, 0%), var(--line) var(--p, 0%)); }
.live-progress::-moz-range-track { height: 8px; border-radius: 999px; background: var(--line); }
.live-progress::-moz-range-progress { height: 8px; border-radius: 999px; background: var(--accent); }
.live-progress::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -8px; border-radius: 50%; border: 2px solid #fff6dc; background: var(--accent); box-shadow: 0 2px 6px rgba(0, 0, 0, .4); }
.live-progress::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #fff6dc; background: var(--accent); box-shadow: 0 2px 6px rgba(0, 0, 0, .4); }
.live-progress:focus-visible { outline: 3px solid var(--accent-light); outline-offset: 2px; border-radius: var(--radius-sm); }
.live-controls { justify-content: center; }
.live-controls .btn { min-height: 44px; min-width: 44px; }
.live-play { min-width: 8.5rem; min-height: 44px; }
.live-play[hidden], .live-sheet[hidden], .live-skip[hidden], .live-speeds[hidden], .live-air-note[hidden] { display: none; }
.live-speeds { display: inline-flex; gap: 6px; }
/* On air the bar only shows how far the match has gone: no thumb to drag, no pointer. */
.live-progress:disabled { cursor: default; }
.live-progress:disabled::-webkit-slider-thumb { visibility: hidden; }
.live-progress:disabled::-moz-range-thumb { visibility: hidden; }
.live-air-note { margin: 0; font-size: var(--text-xs); text-align: center; }
.live-speed { min-height: 44px; min-width: 44px; padding: 0 12px; }
.live-speed[aria-pressed="true"] { border-color: var(--accent-light); background: rgba(245, 214, 138, 0.18); color: var(--accent-light); }
.live-end { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px 16px; padding-top: 4px; border-top: 1px solid var(--line); }
.live-end[hidden] { display: none; }
.live-final { display: flex; justify-content: center; align-items: baseline; width: 100%; min-width: 0; contain: inline-size; margin: 0; font-size: var(--text-base); font-weight: 700; text-align: center; white-space: nowrap; }
.live-final-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.live-final-score { flex: none; white-space: pre; }
.live-final-pens { margin: 0; text-align: center; }
.live-feed-card { padding: 8px; }
.live-feed { display: grid; align-content: start; gap: 8px; max-height: min(58vh, 540px); min-height: 220px; overflow-y: auto; padding: 4px; overscroll-behavior: contain; }
.live-feed:focus-visible { outline: 3px solid var(--accent-light); outline-offset: 2px; }
.live-empty { margin: 8px; }
.live-event { display: grid; grid-template-columns: 4.2rem minmax(0, 1fr); gap: 10px; padding: 9px 12px; border-radius: 8px; background: var(--panel-2); border-left: 4px solid transparent; }
.live-event.home { border-left-color: #6fb7ff; }
.live-event.away { border-left-color: #ff9f6f; }
.live-min { font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.live-body p { margin: 0 0 2px; overflow-wrap: anywhere; }
.live-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; margin-bottom: 2px; font-size: var(--text-sm); }
.live-kind { display: inline-flex; align-items: center; gap: 5px; padding: 0 8px; border-radius: 999px; border: 1px solid var(--line); font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; color: var(--muted); }
.live-card { display: inline-block; width: 9px; height: 13px; border-radius: 2px; }
.live-kind.yellow .live-card { background: #f4c430; }
.live-kind.red .live-card { background: #e0443a; }
.live-kind.injury { color: #ffb0a0; border-color: #c4544a; }
.live-kind.order, .live-kind.sub { color: #9fd3ff; border-color: #4d86b3; }
.live-kind.half, .live-kind.kickoff, .live-kind.stoppage { color: var(--accent-light); border-color: var(--accent); }
.live-kind.var { color: #d6bcff; border-color: #8a63c9; }
.live-event.goal { padding: 14px 12px; background: rgba(244, 196, 48, 0.18); border-left-color: var(--accent); }
.live-event.goal .live-min { font-size: var(--text-base); color: var(--accent-light); }
.live-event.goal .live-body p { font-size: var(--text-base); font-weight: 700; color: #fff6dc; }
.live-event.goal .live-kind { color: var(--color-accent-ink); background: var(--accent); border-color: var(--accent); }
.live-event.fresh { animation: live-fresh 1.6s ease-out; }
@keyframes live-fresh { from { box-shadow: 0 0 0 2px rgba(255, 246, 220, 0.85); background-color: rgba(245, 214, 138, 0.28); } to { box-shadow: 0 0 0 0 rgba(255, 246, 220, 0); } }
@media (prefers-reduced-motion: reduce) {
  .live-event.fresh, .live-status.live::before { animation: none; }
  .live-feed { scroll-behavior: auto; }
}
@media (max-width: 520px) {
  .live-scoreline { gap: 6px; }
  .live-center { min-width: 5.6rem; }
  .live-clock { font-size: var(--text-lg); }
  .live-score { font-size: var(--text-2xl); gap: 0.3rem; }
  .live-team-name { font-size: var(--text-md); }
  .live-event { grid-template-columns: 3.4rem minmax(0, 1fr); gap: 8px; padding: 8px 10px; }
  .live-event.goal .live-body p { font-size: var(--text-base); }
  .live-top { margin-bottom: 8px; }
  .live-top h1 { font-size: var(--text-lg); }
  .live-top .live-sheet { display: none; }   /* the match sheet is offered when it ends */
  .live-board { gap: 10px; }
  .live-controls { gap: 8px; flex-wrap: wrap; }
  .live-controls .btn { flex: 1 1 auto; min-height: 44px; min-width: 44px; }
  .live-speeds:not([hidden]) { display: inline-flex; gap: 6px; }
  .live-speeds .btn { min-width: 44px; min-height: 44px; }
  .live-play { flex: 2 1 8rem; min-width: 0; min-height: 44px; }
  .live-feed { max-height: 52vh; min-height: 200px; }
}
/* The "Ao vivo" chip: a match on air (the 5 minutes after it was played), in the lists instead of its score and on the dashboard. */
.live-chip[hidden] { display: none; }
.live-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border: 1px solid #c4544a; border-radius: 999px; font-size: var(--text-xs); font-weight: 700; color: #ffb0a0; text-decoration: none; white-space: nowrap; }
.live-chip i { width: 8px; height: 8px; border-radius: 50%; background: #e0443a; animation: live-dot 1.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .live-chip i { animation: none; } }

/* --- Manual (#/manual) ------------------------------------------------------------------------------------------------- */
/* The footer: "Manual" and "Privacidade" together, in the first cell of the footer grid. */
.site-footer > .footer-start { justify-self: end; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 0 14px; }
.manual-page { max-width: 1120px; margin: 0 auto; }
.manual-page.public { padding: 16px 12px 32px; }
.manual-card { padding: clamp(16px, 3vw, 28px); overflow: visible; }   /* .card scrolls sideways (overflow-x): that would take the index out of sticky */
.manual-head h1 { margin: 0 0 8px; }
.manual-intro { margin: 0 0 16px; max-width: 72ch; color: var(--muted); font-size: var(--text-base); line-height: 1.6; }
.manual-provisional { display: inline-block; margin: 0 0 8px; }
/* The instant search: 44px tall, the magnifier inside the field, never wider than a comfortable reading column. */
.manual-search { position: relative; max-width: 34rem; margin: 0 0 12px; }
.manual-search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); display: inline-flex; color: var(--muted); pointer-events: none; }
.manual-search-input { width: 100%; min-height: 44px; padding: 10px 14px 10px 38px; border: 1px solid var(--line); border-radius: var(--radius-md); background: rgba(0, 0, 0, 0.25); color: var(--text); }
.manual-search-input::placeholder { color: var(--muted); }
.manual-search-input:focus-visible { outline: 3px solid var(--accent-light); outline-offset: 1px; }
/* The pillar chips: one row that scrolls sideways on a phone, never a second line of buttons. */
.manual-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; }
.manual-chip { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; min-height: 40px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: rgba(0, 0, 0, 0.2); color: var(--muted); font: inherit; font-size: var(--text-sm); font-weight: 600; white-space: nowrap; cursor: pointer; }
.manual-chip:hover { color: var(--text); border-color: var(--accent-light); }
.manual-chip[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 16%, transparent); border-color: var(--accent); color: var(--accent); }
.manual-chip:focus-visible { outline: 3px solid var(--accent-light); outline-offset: 2px; }
.manual-search-empty { margin: 12px 0 0; color: var(--muted); }
.manual-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px 32px; margin-top: 16px; align-items: start; }
.manual-index { display: none; }   /* a phone: the topic selector picks the section, the chips and the search narrow the list */
.manual-main { display: grid; gap: 12px; min-width: 0; }
.manual-topic-select { width: 100%; max-width: 34rem; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-md); background: rgba(0, 0, 0, 0.25); color: var(--text); font: inherit; }
.manual-topic-select:focus-visible { outline: 3px solid var(--accent-light); outline-offset: 1px; }
.manual-body { display: grid; gap: 16px; min-width: 0; max-width: 78ch; }
.manual-section { margin: 0; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--panel-2); scroll-margin-top: 16px; outline: none; }
.manual-section:focus-visible { outline: 3px solid var(--accent-light); outline-offset: 2px; }
.manual-section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.manual-section-head h2 { margin: 0; font-size: var(--text-lg); line-height: 1.25; }
.manual-section-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 6px; border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent); background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); font-size: var(--text-xs); font-weight: 700; white-space: nowrap; }
.manual-section p { margin: 0 0 12px; line-height: 1.65; font-size: var(--text-base); overflow-wrap: break-word; }
.manual-terms { margin: 0; display: grid; gap: 10px; }
.term-box { padding: 10px 14px; border-left: 3px solid var(--accent); border-radius: 0 var(--radius-md) var(--radius-md) 0; background: rgba(0, 0, 0, 0.2); }
.term-title { margin: 0 0 3px; font-weight: 700; font-size: var(--text-base); }
.term-text { margin: 0; line-height: 1.55; font-size: var(--text-md); color: var(--muted); overflow-wrap: break-word; }
.manual-back { margin: 24px 0 8px; }
@media (min-width: 900px) {
  .manual-layout { grid-template-columns: 17rem minmax(0, 1fr); }
  .manual-topic-select { display: none; }   /* the index beside the text picks the section */
  .manual-index { display: block; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-md); background: rgba(0, 0, 0, 0.18); }
  .manual-index-title { margin: 0 0 8px; font-size: var(--text-xs); color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
  .manual-index-group + .manual-index-group { margin-top: 12px; }
  .manual-index-pillar { display: flex; align-items: center; gap: 6px; margin: 0 0 4px; font-size: var(--text-xs); color: var(--muted); font-weight: 700; }
  .manual-index ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 1px; }
  .manual-index a { display: block; min-height: 32px; padding: 6px 8px; border-radius: var(--radius-sm); overflow-wrap: anywhere; }
  .manual-index a:hover { background: rgba(255, 255, 255, 0.07); text-decoration: none; }
  .manual-index a[aria-current] { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); font-weight: 700; }
  .manual-index a:focus-visible, .manual-body :is(a, section):focus-visible { outline: 3px solid var(--accent-light); outline-offset: 2px; }
}

/* The upgrade pop-up of a facility: the level now, an arrow down, the level it becomes (each with its weekly upkeep). */
.upgrade-steps { display: grid; justify-items: start; gap: 2px; margin: 10px 0; }
.upgrade-step { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.upgrade-step.next { color: var(--accent-light); }
.upgrade-arrow { display: inline-flex; padding-left: 14px; color: var(--muted); }

/* A dialog's title and its close button stay on one row, however long the title ("Modernizar Centro de treinamento"): the title wraps inside its own space. */
.modal > .topbar { flex-wrap: nowrap; align-items: flex-start; gap: 12px; }
.modal > .topbar h2 { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.modal > .topbar .btn { flex: none; }
.ends-left { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* League tab: the round title with its kickoff beside it; it wraps under the title on a narrow card. */
.round-bar { flex-wrap: nowrap; }
.round-bar .btn { flex: none; }
.round-title { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 0; text-align: center; }
.round-title h2 { margin: 0; }

/* Calendar (Partidas): the two tables (upcoming, season) share ONE column template, so they line up one above the other:
   [round / competition: fixed, centred] [home: 1fr, packed against the centre] [x / score: fixed, centred] [away: 1fr, packed against the centre]. Fixed layout, no horizontal scroll at any width. */
.stadium-app .board .main table.club-fixtures-table { table-layout: fixed; width: 100%; min-width: 0; }
.stadium-app .board .main table.club-fixtures-table :is(th, td).col-fixed-1 { width: 7.5rem; min-width: 0; text-align: center; white-space: normal; overflow-wrap: anywhere; }
.stadium-app .board .main table.club-fixtures-table :is(th, td).score-cell { width: 5.5rem; min-width: 0; text-align: center; white-space: normal; line-height: 1.2; }   /* "1-1 (6-7 pên.)" wraps under the score instead of running into the names */
/* The matchup is mirrored around the centre: HOME sits at the OUTER edge (crest, then the name beside it, packed to
   the left) and AWAY at the other edge (name, then the crest, packed to the right); the headers follow (Gabriel,
   15/11/2026: they were centred in the cell while the data was at the edges, so they did not sit over their column).
   The name box shrinks only (flex 0 1 auto), so crest and name stay together and a long name ends in an ellipsis. */
.stadium-app .board .main table.club-fixtures-table :is(th, td).team-home { width: auto; text-align: left; }
.stadium-app .board .main table.club-fixtures-table :is(th, td).team-away { width: auto; text-align: right; }
.stadium-app .board .main table.club-fixtures-table td.team-home .team-with-crest { flex-direction: row; justify-content: flex-end; }
.stadium-app .board .main table.club-fixtures-table td.team-away .team-with-crest { flex-direction: row-reverse; justify-content: flex-end; }
.stadium-app .board .main table.club-fixtures-table td.team-home .team-label { flex: 0 1 auto; text-align: right; }
.stadium-app .board .main table.club-fixtures-table td.team-away .team-label { flex: 0 1 auto; text-align: left; }
.stadium-app .board .main table.club-fixtures-table td.team-home, .stadium-app .board .main table.club-fixtures-table td.team-away { overflow: hidden; }
/* The 5th column: date and time of the game ("sex., 30/10 · 22:00"), fixed width, right-aligned, tabular figures, never wrapping. Empty when the API has no date. The short date under the
   label (.fixture-when) is for phones only. */
.stadium-app .board .main table.club-fixtures-table :is(th, td).col-date { width: 9rem; min-width: 0; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.stadium-app .board .main table.club-fixtures-table td.col-date { color: var(--muted); font-size: var(--text-xs); }
.stadium-app .board .main table.club-fixtures-table .fixture-when { display: none; }
/* Compact (.fixtures-compact: the latest quick matches and the friendly league rounds, cards half the page wide): no header and no date column, the date goes
   under the label as on a phone, a narrower score and no shirt beside the crest, so the names keep their room beside the score. */
.stadium-app .board .main table.club-fixtures-table.fixtures-compact thead { display: none; }
.stadium-app .board .main table.club-fixtures-table.fixtures-compact :is(th, td).col-date { display: none; }
.stadium-app .board .main table.club-fixtures-table.fixtures-compact .fixture-when { display: block; margin-top: 1px; color: var(--muted); font-size: var(--text-xs); line-height: 1.15; white-space: normal; overflow-wrap: anywhere; }
.stadium-app .board .main table.club-fixtures-table.fixtures-compact .fixture-when .round-kickoff { font-size: inherit; }
.stadium-app .board .main table.club-fixtures-table.fixtures-compact :is(th, td) { padding-inline: 6px; }
.stadium-app .board .main table.club-fixtures-table.fixtures-compact :is(th, td).col-fixed-1 { width: 5.5rem; overflow-wrap: normal; }
.stadium-app .board .main table.club-fixtures-table.fixtures-compact :is(th, td).score-cell { width: 3.6rem; }
.stadium-app .board .main table.club-fixtures-table.fixtures-compact .kit-mark { display: none; }
.stadium-app .board .main table.club-fixtures-table.fixtures-compact .team-with-crest { gap: 6px; }
@media (max-width: 760px) {
  .stadium-app .board .main table.club-fixtures-table :is(th, td).col-date { display: none; }
  .stadium-app .board .main table.club-fixtures-table .fixture-when { display: block; margin-top: 1px; color: var(--muted); font-size: var(--text-xs); line-height: 1.15; white-space: normal; overflow-wrap: anywhere; }
  .stadium-app .board .main table.club-fixtures-table .fixture-when .round-kickoff { font-size: inherit; }
}
@media (max-width: 760px) {
  /* Narrow: the same cut in both tables (smaller side columns, crests and header type) so the names get the room; the names still end in an ellipsis, never a horizontal scroll. */
  .stadium-app .board .main table.club-fixtures-table :is(th, td) { padding-inline: 3px; }
  .stadium-app .board .main table.club-fixtures-table thead th { font-size: var(--text-xs); letter-spacing: 0; }
  .stadium-app .board .main table.club-fixtures-table :is(th, td).col-fixed-1 { width: 4.9rem; font-size: var(--text-xs); overflow-wrap: normal; }   /* "Ranqueada", "Showmatch" whole: a label breaks between words only */
  .stadium-app .board .main table.club-fixtures-table thead th.col-fixed-1 { font-size: var(--text-xs); padding-inline: 1px; white-space: nowrap; }
  .stadium-app .board .main table.club-fixtures-table :is(th, td).score-cell { width: 3.4rem; }
  .stadium-app .board .main table.club-fixtures-table .team-with-crest { gap: 4px; }
  /* The "Ao vivo" chip in the score column, small enough to stay inside it (it used to run over the away name). */
  .stadium-app .board .main table.club-fixtures-table td.score-cell .live-chip { gap: 3px; padding: 1px 4px; font-size: var(--text-xs); max-width: 100%; }
  .stadium-app .board .main table.club-fixtures-table td.score-cell .live-chip i { width: 6px; height: 6px; flex: none; }
  .stadium-app .board .main table.club-fixtures-table .crest { flex-basis: 20px; width: 20px; height: 20px; --s: 20px; }
  /* No shirt on a phone: the crest alone, so the club names get the room to be read. */
  .stadium-app .board .main table.club-fixtures-table .kit-mark { display: none; }
}
/* The Painel (last and next games) and Partida Rápida (last quick matches) show, on a phone, the calendar table above (fixturesTable in views/matches.mjs):
   crest, the names against the score, competition and date on the left. Wider screens keep their own lists. */
.fixtures-mobile { display: none; }
@media (max-width: 760px) {
  .fixtures-mobile { display: block; }
  .fixtures-desktop { display: none !important; }
}

/* League standings: no horizontal scroll. Fixed layout; # and the eight numbers are narrow fixed columns (tabular figures, small side padding, title and figure on one centre line),
   the club column takes what is left and cuts its name with an ellipsis. On a phone GA and GD are hidden (head, body and colgroup alike). */
.stadium-app .board .main table.league-standings-table { table-layout: fixed; width: 100%; min-width: 0; }
.league-standings-table col.c-pos { width: 3.6rem; }
.league-standings-table col.c-num { width: 2.6rem; }
.stadium-app .board .main table.league-standings-table :is(th, td) { padding-inline: 4px; }
.stadium-app .board .main table.league-standings-table :is(th, td).num { width: auto; min-width: 0; text-align: center; font-variant-numeric: tabular-nums; }
.stadium-app .board .main table.league-standings-table :is(th, td).pos-cell { width: auto; min-width: 0; text-align: center; white-space: nowrap; }
.stadium-app .board .main table.league-standings-table :is(th, td).team-name { text-align: left; overflow: hidden; }
.stadium-app .board .main table.league-standings-table td.team-name .team-with-crest { display: flex; max-width: 100%; }
.stadium-app .board .main table.league-standings-table td.team-name .team-label { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; -webkit-line-clamp: unset; }
@media (max-width: 640px) {
  .league-standings-table col.c-pos { width: 2rem; }
  /* Numbers gain 5 px each for the club column: the names read on one line without being cut ("Clube Atlético Patos"). */
  .league-standings-table col.c-num { width: 1.4rem; }
  /* O cabecalho PTS (25 px) e mais largo que os digitos: a coluna dele fica com a folga propria. */
  .league-standings-table col.pts { width: 1.6rem; }
  .stadium-app .board .main .card:has(> .table-wrap > .league-standings-table) { padding-inline: 6px; }
  .stadium-app .board .main table.league-standings-table .crest { flex-basis: 18px; width: 18px; height: 18px; --s: 18px; }
  .stadium-app .board .main table.league-standings-table .team-with-crest { gap: 4px; }
  .stadium-app .board .main table.league-standings-table td.align-club { padding-left: 3px; }
  .league-standings-table :is(col.ga, col.gd) { display: none; }
  .stadium-app .board .main table.league-standings-table :is(th, td):is(:nth-child(8), :nth-child(9)) { display: none; }
  .stadium-app .board .main table.league-standings-table :is(th, td) { padding-inline: 2px; font-size: var(--text-xs); }
}
.rankings { align-items: stretch; }
.rankings > .card { display: flex; flex-direction: column; }
.rankings > .card > .table-wrap { flex: 1; }
.rankings table :is(th, td):nth-child(1) { width: 9%; }
.rankings table :is(th, td):nth-child(2) { width: 35%; }
.rankings table :is(th, td):nth-child(3) { width: 36%; }
.rankings table :is(th, td):nth-child(4) { width: 20%; }

/* Challenge a manager: the suggestions are a popover anchored to the field (the wrapper is position: relative; the list is absolute, top: 100% + 4px, as wide as the field, above the neighbouring cards).
   The card must not clip it nor grow a scroll bar for it (.card scrolls sideways by default, which also clips vertically), so this one card lets its content overflow. */
.card.qm-challenge-card { overflow: visible; position: relative; z-index: 2; }
.qm-typeahead-wrap .qm-suggestions.opens-up { top: auto; bottom: calc(100% + 4px); }
.qm-typeahead-wrap { position: relative; flex: 1 1 16rem; min-width: 0; max-width: min(100%, 22rem); }
.card.qm-challenge-card .inline-pick { flex-wrap: wrap; }   /* on a phone the field takes its own row and the send button goes under it */
.qm-typeahead-wrap .qm-suggestions { left: 0; right: 0; width: auto; min-width: 0; max-width: 100%; max-height: min(55vh, 24rem); overscroll-behavior: contain; }

/* Scout players (Mercado > Observar): fixed layout, the table is exactly as wide as its card and the button can never leave it.
   PLAYER takes what is left (avatar + name, the name ends in an ellipsis); POS, AGE and REC are short and equal; CLUB is medium (ellipsis); AGENT PRICE has room for
   its figure; the last column is the button's. Short columns: title and data centred on one line; PLAYER and CLUB left; price right. On a phone AGE and CLUB go and the price
   moves above the button. */
.stadium-app .board .main table.market-scouting-table { table-layout: fixed; width: 100%; min-width: 0; }
.market-scouting-table col.c-short { width: 6.2rem; }
.market-scouting-table col.c-club { width: 8.5rem; }
.market-scouting-table col.c-price { width: 9rem; }
.market-scouting-table col.c-action { width: 9.25rem; }
.stadium-app .board .main table.market-scouting-table :is(th, td) { width: auto; min-width: 0; padding-inline: 6px; max-width: none; }
.stadium-app .board .main table.market-scouting-table :is(th, td).col-fixed-1 { text-align: left; overflow: hidden; }
.stadium-app .board .main table.market-scouting-table td.col-fixed-1 .person { display: flex; min-width: 0; max-width: 100%; }
.stadium-app .board .main table.market-scouting-table td.col-fixed-1 .person > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stadium-app .board .main table.market-scouting-table :is(th, td):is(:nth-child(2), :nth-child(3), :nth-child(4)) { text-align: center; font-variant-numeric: tabular-nums; }
.stadium-app .board .main table.market-scouting-table :is(th, td).market-col-club { text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stadium-app .board .main table.market-scouting-table :is(th, td).market-col-agent-price { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stadium-app .board .main table.market-scouting-table :is(th, td).market-col-action { text-align: center; white-space: normal; }
.stadium-app .board .main table.market-scouting-table .market-offer-cell { display: grid; justify-items: center; gap: 4px; min-width: 0; }
.stadium-app .board .main table.market-scouting-table .market-offer-cell .btn { max-width: 100%; white-space: nowrap; }
.stadium-app .board .main table.market-scouting-table .market-positions { flex-wrap: wrap; }
@media (max-width: 760px) {
  .market-scouting-table :is(col.c-age, col.c-club, col.c-price) { display: none; }
  .market-scouting-table col.c-short { width: 2.7rem; }
  .market-scouting-table col.c-rec { width: 3.1rem; }
  .market-scouting-table col.c-action { width: 5.6rem; }
  .stadium-app .board .main .card:has(> .table-wrap > .market-scouting-table) { padding-inline: 6px; }
  .stadium-app .board .main table.market-scouting-table td.col-fixed-1 .avatar { --avatar-size: 24px !important; }
  .stadium-app .board .main table.market-scouting-table td.col-fixed-1 .person { gap: 5px; }
  .stadium-app .board .main table.market-scouting-table :is(th, td) { padding-inline: 3px; }
  .stadium-app .board .main table.market-scouting-table .stars { font-size: var(--text-xs); letter-spacing: 0; }
  .stadium-app .board .main table.market-scouting-table .market-offer-price { font-size: var(--text-xs); font-variant-numeric: tabular-nums; white-space: nowrap; }
  .stadium-app .board .main table.market-scouting-table :is(th, td).market-col-action { padding-inline: 1px; overflow: hidden; }
}
.stadium-app .board .main table.market-scouting-table :is(th, td):nth-child(2) { padding-inline: 2px; }
.stadium-app .board .main table.market-scouting-table .market-positions { gap: 2px; }

.stadium-app .board .main table.dense-table.market-table :is(th, td).col-fixed-1 { text-align: left; overflow: hidden; }
.stadium-app .board .main table.dense-table.market-table td.col-fixed-1 .person { display: flex; align-items: center; min-width: 0; max-width: 100%; }
.stadium-app .board .main table.dense-table.market-table td.col-fixed-1 .person > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stadium-app .board .main table.dense-table.market-table td.col-fixed-1 .cut-name { max-width: 100%; min-width: 0; overflow: hidden; }

@media (max-width: 760px) {
  .stadium-app .board .main table.dense-table.market-table :is(th, td) { padding-inline: 4px; }
  .stadium-app .board .main table.dense-table.market-table :is(th, td):first-child {
    width: 125px;
    min-width: 115px;
    max-width: 135px;
    border-right: 1px solid rgba(130, 178, 154, 0.25);
  }
  .stadium-app .board .main table.dense-table.market-table thead th.col-fixed-1 {
    background: #153331;
    z-index: 4;
  }
  .stadium-app .board .main table.dense-table.market-table tbody tr:nth-child(odd) td.col-fixed-1 {
    background: #0f2725;
  }
  .stadium-app .board .main table.dense-table.market-table tbody tr:nth-child(even) td.col-fixed-1 {
    background: #0b1f1e;
  }
  .stadium-app .board .main table.dense-table.market-table td.col-fixed-1 .avatar { --avatar-size: 24px !important; }
  .stadium-app .board .main table.dense-table.market-table td.col-fixed-1 .person { gap: 5px; }
  .stadium-app .board .main table.dense-table.market-table :is(th, td):nth-child(2) { width: 58px; min-width: 54px; }
  .stadium-app .board .main table.dense-table.market-table :is(th, td):nth-child(4) { width: 46px; min-width: 44px; }
  .stadium-app .board .main table.dense-table.market-table .stars { font-size: var(--text-xs); letter-spacing: 0; }
  .stadium-app .board .main table.dense-table.market-table :is(th, td).market-col-price,
  .stadium-app .board .main table.dense-table.market-table:not(.market-scouting-table) :is(th, td):nth-child(7) {
    width: 105px;
    min-width: 100px;
    font-size: var(--text-xs);
  }
  .stadium-app .board .main table.dense-table.market-table :is(th, td):last-child {
    width: 90px;
    min-width: 85px;
    padding-inline: 4px;
    overflow: visible;
  }
}

/* The club's own shirt (kit editor): a picture next to the crest, and a small badge on the pitch shirts in the tactics board. */
.kit-picture { display: block; width: 96px; height: 96px; object-fit: contain; border-radius: 8px; }
.kit-none { display: inline-flex; align-items: center; justify-content: center; width: 88px; height: 88px; font-size: 2.6rem; background: var(--crest-paper); border: 2px dashed var(--wood-edge); border-radius: 8px; }
.crest-kit-none { display: inline-flex; align-items: center; justify-content: center; width: 96px; height: 96px; font-size: 2.6rem; background: var(--crest-paper); border: 2px dashed var(--wood-edge); border-radius: 8px; }
.crest-account .kit-picture { width: 96px; height: 96px; }
.crest-landing-now { flex-wrap: wrap; }
.crest-landing-now > p { flex: 1 1 14rem; min-width: 0; }
.kit-picture.kit-now { width: 120px; height: 120px; flex: none; background: var(--crest-paper); border: 2px solid var(--wood-edge); border-radius: 8px; padding: 6px; }
.crest-allsame { margin: 8px 0; }
.crest-allsame label { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; cursor: pointer; }
.crest-allsame input { width: 24px; height: 24px; min-height: 0; flex: none; accent-color: var(--accent); }

/* Club Shop (#/loja): a marketplace of cards */
/* Every card the same size (2026-11-12): fixed columns, up to 4 per row on a desktop, so a filter with two cards does not
   stretch them; 3 on a narrow desktop, 2 on a tablet, 1 on a phone. */
.shop-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4, 16px); margin-top: var(--space-4, 16px); }
/* Where Glory Points come from (Shop head, Comece por aqui), the balance after a purchase, the season's cash ceiling and a pack past it. */
.glory-source { margin: 8px 0 0; font-size: 13px; max-width: 65ch; }
.shop-after { margin: 4px 0 0; font-size: 13px; font-variant-numeric: tabular-nums; }
.shop-cash-note { font-size: 13px; font-variant-numeric: tabular-nums; }
.shop-card.shop-card-off { opacity: 0.6; }
@media (max-width: 1180px) { .shop-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) { .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .shop-grid { grid-template-columns: minmax(0, 1fr); } }
.shop-card { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.shop-card .chips { margin-top: auto; padding-top: 8px; }
.shop-card-art { display: flex; align-items: center; justify-content: center; min-height: 128px; background: var(--crest-paper); border: 2px solid var(--wood-edge); border-radius: 8px; padding: 12px; }
/* The Designer's picture (shop-art.mjs): it fills the box, 5:3, and the box keeps the card's border; the crest and the shirt
   take the shared backdrop instead, with their own drawn art on top. */
.shop-card-art.has-art { padding: 0; overflow: hidden; background: #0f1c14; }
.shop-card-art.has-art .shop-art-img { display: block; width: 100%; height: auto; aspect-ratio: 5 / 3; object-fit: cover; }
.shop-card-art.has-backdrop { background-position: center; background-size: cover; }
.shop-stadium-name { margin: 0; overflow-wrap: anywhere; }
.shop-card-art .kit-picture { width: 96px; height: 96px; }
.shop-stadium-sign { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; color: #3a2a12; font-size: var(--text-base); overflow-wrap: anywhere; }
.shop-stadium-sign span { font-size: var(--text-2xl); }
.shop-price { margin: 0; }
.shop-note { margin: 0; color: var(--accent-light); }
/* 2026-11-12: the filter bar (six equal buttons, the chosen one grey) and the card as art + name + one button at the foot.
   Every art box is 5:3, so the names and the buttons line up across a row whatever the picture. */
.shop-filters { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-top: var(--space-4, 16px); }
.shop-filter { min-height: 44px; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--radius-sm, 8px); background: transparent; color: var(--text); font: inherit; font-size: var(--text-sm); font-weight: 700; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shop-filter:hover { border-color: var(--muted); }
.shop-filter[aria-pressed="true"] { background: #8a8f98; border-color: #8a8f98; color: #fff; }
@media (max-width: 640px) { .shop-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; } .shop-filter { padding: 0 2px; font-size: var(--text-xs); letter-spacing: -0.01em; } }
.shop-card { cursor: pointer; }
.shop-card[hidden] { display: none; }
.shop-card h2 { margin: 0; font-size: var(--text-base); line-height: 1.3; min-height: 2.6em; }   /* two lines for every name: all cards the same height */
.shop-card .shop-card-art { aspect-ratio: 5 / 3; min-height: 0; }
.shop-card .shop-card-art.has-art .shop-art-img { height: 100%; }
.shop-card .shop-buy { margin-top: auto; width: 100%; min-height: 44px; height: 44px; padding: 0 8px; white-space: nowrap; }
.shop-empty { margin-top: var(--space-4, 16px); }
.shop-popup { display: grid; gap: 8px; max-width: 32rem; }
.shop-popup p { margin: 0; }
.shop-popup-text { line-height: 1.5; }
.btn.disabled, a.btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }

/* The club's shirt as a small mark beside the crest: match lines, match report and the next-match card (kitMark in crest.mjs) */
.rt-mark { align-items: center; gap: 4px; }   /* the crest and the shirt of a result line */
.results.upcoming .rt-mark .kit-mark { display: none; }   /* Próximos jogos: the lines are tight, the names win (the shirts show in Últimos jogos and in the match card) */
.rt-mark .kit-mark { width: 18px; height: 18px; }   /* smaller in the result lines: the names need the room */
.kit-mark { display: inline-block; flex: none; object-fit: contain; vertical-align: middle; }
.kit-mark-sm { width: 24px; height: 24px; }
.kit-mark-lg { width: 84px; height: 84px; }
.team-marks { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.dashboard .next-team-crest { gap: 8px; }
@media (max-width: 560px) {
  .kit-mark-sm { width: 16px; height: 16px; }
  .team-with-crest { gap: 4px; }
  .club-profile-matches .kit-mark { display: none; }   /* another club's page: that list is the tightest, the names win on a phone */
  .kit-mark-lg { width: 68px; height: 68px; }
  .team-marks, .dashboard .next-team-crest { gap: 4px; }
}

/* --- Tri-code on a phone (team-code.mjs) ------------------------------------------------------------------------------
   Below 761 px a fixture row shows the club's three letters beside its crest instead of a name that used to end in an ellipsis;
   from 761 px up nothing changes. The display font is the same Bebas Neue the crest editor and the badges use (SIL OFL). */
@font-face { font-family: 'GM Bebas'; src: url('/assets/crest/fonts/BebasNeue.ttf') format('truetype'); font-display: swap; }
.team-name-wrap { display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%; }
/* REGRA UNICA DO NOME DO CLUBE (Gabriel, 15/11/2026): o modo vem do container, nunca da largura da tela.
   - Linha de jogo (dois clubes + placar ou x: calendario, partidas, rodada da Liga, rodada de copa): SIGLA de 3 letras.
   - Lista de uma coluna (classificacao, mercado) e destaques (Painel, perfil do clube): NOME COMPLETO.
   A sigla sempre leva o nome inteiro em title e aria-label (team-code.mjs#teamLabel), e a fonte/peso dela sao os mesmos em
   toda tela. Assim uma tabela e identica no celular e no desktop. */
/* 15/11/2026 (dono): na linha de jogo o nome encurtado fica SO no celular. No desktop a linha mostra o nome completo;
   abaixo de 761 px ela troca pela sigla (team-code.mjs#teamLabel, modo 'code', escreve os dois). */
.team-name-code { display: none; }
@media (max-width: 760px) {
.team-name-wrap.team-name-fixture .team-name-full { display: none; }
.team-name-wrap.team-name-fixture .team-name-code {
  display: inline-block; font-family: 'GM Bebas', 'Barlow Condensed', system-ui, sans-serif;
  font-size: var(--text-base); font-weight: 600; line-height: 1; letter-spacing: .06em; white-space: nowrap;
}
}
/* A fixture without a page of its own is still tappable on a phone: the tap opens the match sheet. */
tr.tap-sheet { cursor: pointer; }

/* --- The match sheet of a phone (match-sheet.mjs) --------------------------------------------------------------------- */
.sheet-meta { margin: 0 0 6px; font-size: var(--text-xs); }
.sheet-scoreline { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 10px; margin: 8px 0 4px; }
.sheet-team { display: grid; justify-items: center; gap: 6px; min-width: 0; text-align: center; }
.sheet-team strong { font-size: var(--text-md); line-height: 1.15; overflow-wrap: anywhere; }
.sheet-score { font-size: var(--text-xl); font-weight: 900; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sheet-details h3 { margin: 16px 0 6px; font-size: var(--text-xs); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.sheet-goals { display: grid; gap: 6px; }
.sheet-goal { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 8px; margin: 0; font-size: var(--text-sm); align-items: baseline; }
.sheet-goal .sheet-min { color: var(--accent); font-weight: 800; }
.sheet-goal .sheet-side { color: var(--muted); font-size: var(--text-xs); text-align: right; }
/* Shop extras (tactic slots, position tickets, friendly tickets): an icon on the art plate, the text, what the club has. */
.shop-extra-art { color: var(--wood-edge, #6b4a2b); }
.shop-extra-text { margin: 0; font-size: var(--text-md); line-height: 1.45; }
.shop-extra-have { margin: 0; font-weight: 700; }

/* Quick match (2026-11-12): the score and the ranking place sit beside the ranked card's title. */
.qm-ranked-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 12px; }
.qm-ranked-head h2 { margin: 0; }
.qm-ranked-head .chips { margin: 0; }
/* News (2026-11-12): "Nova conquista! <name>", the name a button that opens the achievement's popup. */
.news-ach-link { padding: 0; border: 0; background: none; color: var(--accent-light); font: inherit; font-weight: 700; cursor: pointer;
  min-height: 0; display: inline; text-decoration: underline; text-underline-offset: 2px; }
.news-ach-link:hover { color: var(--accent); }

/* News by type (owner's request, 15/11/2026, news-tags.mjs): the filter chips over the list and a small tag on each item. */
.news-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.news-filter {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px;
  border: 1px solid var(--surface-border, rgba(130, 178, 154, .22)); border-radius: 999px;
  background: transparent; color: var(--text); font: inherit; font-size: var(--text-sm); font-weight: 600; cursor: pointer;
}
.news-filter:hover { background: rgba(255, 255, 255, .06); }
.news-filter[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--accent-light, var(--text)); }
.news-filter:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.news-filter-count { color: var(--text-muted); font-size: var(--text-xs); font-variant-numeric: tabular-nums; }
.news-filter-select { display: none; }
@media (max-width: 560px) {
  .news-filters { display: none; }
  .news-filter-select { display: block; width: 100%; max-width: 22rem; min-height: 44px; margin-bottom: 14px; }
}
.news-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 4px; }
.news-meta .news-date { margin: 0; }
.news-tag {
  display: inline-flex; align-items: center; min-height: 20px; padding: 0 8px; border-radius: 999px;
  background: rgba(255, 255, 255, .07); color: var(--text-muted); font-size: var(--text-xs); font-weight: 700; white-space: nowrap;
}

/* Sign-up declarations (terms of use, age): a check box and its text on one row, 44px tall for the thumb (LGPD audit A2/A3). */
.auth-declarations { display: grid; gap: var(--space-2, 8px); margin: var(--space-2, 8px) 0; }
.auth-check { display: flex; align-items: center; gap: var(--space-2, 8px); min-height: 44px; font-size: var(--text-sm, 0.875rem); cursor: pointer; }
/* The box sits on the text's line: the global input rule gives it 44px of height, which pushed it under the sentence (owner, 24/11). */
.auth-check input[type="checkbox"] { width: 20px; height: 20px; min-height: 0; flex: none; margin: 0; padding: 0; cursor: pointer; }
.auth-check > span { flex: 1 1 auto; line-height: 1.4; }
.auth-check a { text-decoration: underline; }
