@font-face {
  font-family: "Roboto";
  src: url("/assets/roboto-379a3832.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 75% 100%;
  font-display: swap;
}

:root {
  --bulma-family-primary: "Roboto", system-ui, sans-serif;
  --bulma-body-line-height: 1.45;
  --bulma-body-color: #15181C;
  --bulma-text: #454C56;
  --bulma-text-strong: #15181C;
  --bulma-link: #15181C;
  --bulma-link-text: #15181C;
  --bulma-danger-h: 4deg;
  --bulma-danger-s: 74%;
  --bulma-danger-l: 49%;
  --bulma-control-radius: 0.75rem;
}

.navbar {
  --bulma-navbar-item-img-max-height: 2rem;
  border-bottom: 1px solid #E5E7EA;
}

.navbar > .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-inline: 1rem;
}

.section {
  --bulma-section-padding: 1.5rem 1rem 4rem;
}

/* 48px touch targets, also for the quiet text buttons (Editar, Salir and the rows of a group). */
.button.is-medium, .button.is-text {
  min-height: 3rem;
}

/* Light buttons on a white card need a border to look like buttons in the sun. */
.button.is-light {
  border: 1px solid #C9CED6;
}

/* Score and clock: Barlow Condensed when the phone has it; otherwise the narrow width of the local Roboto. */
.scoreboard {
  font-family: "Barlow Condensed", "Roboto", system-ui, sans-serif;
  font-stretch: 75%;
  font-variant-numeric: tabular-nums;
}

/* 2px line icons, one family */
.line-icon { width: 1.375rem; height: 1.375rem; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* The content of <details> does not inherit Bulma's border-box in Chrome, so full-width buttons overflowed. */
details * {
  box-sizing: border-box;
}

/* Match screen: grouped cards, like iOS settings */
.group-title { margin: 1.5rem 0.25rem 0.5rem; font-size: 1rem; font-weight: 600; color: #454C56; }
.group { border: 1px solid #E5E7EA; border-radius: 16px; background: #FFFFFF; overflow: hidden; }
.group > * + *, .group details > :not(summary) { border-top: 1px solid #E5E7EA; }
.group-pad { padding: 1rem; }
.group-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; min-height: 3.25rem; padding: 0.5rem 1rem; }
.hint { margin-top: 0.5rem; color: #454C56; }
.one-line { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Quiet rows: links and folding rows inside a group, with a chevron */
.group .button.is-text { justify-content: flex-start; padding-inline: 1rem; border-radius: 0; font-size: 1rem; font-weight: 600; text-decoration: none; }
.group summary.button { list-style: none; }
.group summary.button::-webkit-details-marker { display: none; }
.group > * + .button { border-top: 1px solid #E5E7EA; }
.group summary.button::after, .group > a.button.is-text::after {
  content: ""; width: 0.5rem; height: 0.5rem; margin-left: auto;
  border: solid #454C56; border-width: 0 2px 2px 0; transform: rotate(-45deg);
}
details[open] > summary.button::after { transform: rotate(45deg); }
.group-summary > :last-child { margin-left: auto; font-weight: 400; }
/* A long team name wraps inside a folding row instead of running over the count. */
.group-summary { gap: 0.75rem; height: auto; white-space: normal; text-align: left; }
.group summary.group-summary::after { margin-left: 0; }

/* Match form: fields inside the cards; a team's code and colors share one row */
.group-pad > .field:last-child, .group-pad > :last-child > .field:last-child { margin-bottom: 0 !important; }
.team-fields { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 0.75rem; }
/* The new and edit pages: one centered column on a wide screen */
.match-form { max-width: 40rem; margin-inline: auto; }
/* Otro club para YouTube: a quiet line under the home team, still 48px tall to tap */
.group .button.field-option { gap: 0.375rem; margin: -1rem 0 0.5rem; padding-inline: 0; font-weight: 500; color: #454C56; background: none; }
.field-option .line-icon { width: 1.125rem; height: 1.125rem; }
/* Latitude and longitude side by side */
.pair-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
/* The imported source is a list of long links. */
.source-credit { overflow-wrap: anywhere; }
/* Venue form: Google's suggestions under the search, like the rows of a group, and the map with its marker */
.suggestions > li + li { border-top: 1px solid #E5E7EA; }
.suggestion { cursor: pointer; }
.suggestion[aria-selected="true"] { background: #F5F6F8; }
/* Google asks for its name in gray #5E5E5E. */
.suggestions-credit { padding-block: 0.5rem; font-size: 0.9375rem; color: #5E5E5E; }
.venue-map { height: 20rem; margin-top: 0.75rem; border: 1px solid #E5E7EA; border-radius: 16px; overflow: hidden; background: #F1F2F4; }
/* Bulma makes a button inline-flex, which beat the hidden attribute of "Buscar la dirección en el mapa". */
.button[hidden] { display: none; }

/* Cómo llegar: Waze and Google Maps side by side */
.directions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; margin-top: 0.75rem; }
/* The match list: one column on a wide screen; the history pages load into frames under the groups. */
.match-list { max-width: 40rem; margin-inline: auto; }
.match-history { display: block; }
.match-history[aria-busy="true"] > .group { opacity: 0.6; }
.match-list-empty { margin-bottom: 0.75rem; padding: 1rem 1.25rem; border-radius: 16px; background: #F5F6F8; color: #454C56; }
/* A match card: the match link fills the card, with its state chip at the right, and Cómo llegar folds under it. */
.match-card { margin-bottom: 0.75rem; border: 1px solid #E5E7EA; border-radius: 16px; background: #FFFFFF; overflow: hidden; }
.match-card-link { display: grid; gap: 0.375rem; padding: 1rem 1.25rem; color: inherit; }
.match-card-link:is(:hover, :active) { background: #F5F6F8; }
.match-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; }
.match-card-head > .chip { flex: none; }
.match-card-details { color: #454C56; }
.match-card summary {
  display: flex; align-items: center; min-height: 3rem; padding: 0 1.25rem;
  border-top: 1px solid #E5E7EA; font-weight: 600; color: #15181C; list-style: none; cursor: pointer;
}
.match-card summary::-webkit-details-marker { display: none; }
.match-card summary::after {
  content: ""; width: 0.5rem; height: 0.5rem; margin-left: auto;
  border: solid #454C56; border-width: 0 2px 2px 0; transform: rotate(-45deg);
}
.match-card details[open] > summary::after { transform: rotate(45deg); }
.match-card-directions { padding: 0 1.25rem 1.25rem; }

/* Match screen: a white header and status band on a soft background, like the approved mockup B */
html:has(.match-screen) { background-color: #F5F6F8; }
/* The status band starts right under the header. */
main:has(.match-screen) { padding-top: 0; }
.match-header { padding: 0.25rem 1rem; background: #FFFFFF; }
.match-header > .container { display: flex; align-items: flex-start; gap: 0.25rem; }
.match-header-text { padding-top: 0.625rem; }
.match-header-text { flex: 1; min-width: 0; }
/* One line per team, so a long name cannot push "+ Gol" under the main button; the score card shows it in full. */
.match-title { display: grid; grid-template-columns: minmax(0, max-content) auto; justify-content: start; align-items: baseline; column-gap: 0.5rem; font-size: 1.25rem; font-weight: 500; line-height: 1.3; color: #15181C; }
.match-title > .team-id:last-child { grid-column: 1 / -1; }
.match-title .team-id { flex-wrap: nowrap; }
.match-title .team-id-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.match-vs { color: #454C56; font-size: 1rem; font-weight: 400; }
.match-subtitle { color: #454C56; }
.icon-button { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 3rem; height: 3rem; margin-left: -0.75rem; color: #15181C; }

/* The team as the staff know it: the full name over its kit stripe, and the code small beside it, or on the next line when the name fills the line */
.team-id { display: inline-flex; flex-wrap: wrap; align-items: baseline; column-gap: 0.375rem; min-width: 0; }
.team-id-kit { display: inline-grid; min-width: 0; }
/* As in the thumbnail: the first color with the second in the middle, and a 12% ink line so a white kit still shows. */
.team-stripe { height: 6px; margin-top: 0.25rem; border-radius: 3px; background: linear-gradient(var(--kit) 2px, var(--kit-2) 2px 4px, var(--kit) 4px); box-shadow: 0 0 0 1px rgb(21 24 28 / 12%); }
.team-id-code { font-size: 0.9375rem; font-weight: 500; letter-spacing: 0.04em; color: #454C56; }
/* One team per line in the list, so a long name never pushes the state chip away. */
.match-teams { display: grid; gap: 0.25rem; min-width: 0; font-size: 1.0625rem; font-weight: 600; color: #15181C; }

/* Status band: the polled status frame, always on top. The shadows paint it white from edge to edge without a scroll. */
turbo-frame.match-status {
  display: block; position: sticky; top: 0; z-index: 30;
  margin: 0 0 1rem; padding: 0.5rem 0 0.75rem; background: #FFFFFF;
  box-shadow: 0 0 0 100vmax #FFFFFF, 0 1px 0 100vmax #E5E7EA; clip-path: inset(0 -100vmax -1px);
}
/* Chips: Bulma tags at 15px, the smallest text size of the app. */
.chip { gap: 0.375rem; height: 2.25rem; padding-inline: 0.625rem; border: 1px solid #C9CED6; border-radius: 8px; background: #FFFFFF; color: #15181C; font-size: 0.9375rem; font-weight: 500; }
.chip.is-danger { border-color: #D92D20; background: #D92D20; color: #FFFFFF; font-weight: 700; }
.chip.is-problem { border: 2px solid #D92D20; color: #D92D20; font-weight: 700; }
.chip-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.chip-dot.is-live { width: 10px; height: 10px; background: #D92D20; }
/* One line each, so the band keeps its height. */
.status-problem { margin-top: 0.5rem; padding-left: 0.5rem; border-left: 4px solid #D92D20; font-weight: 600; color: #15181C; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* The pause banner is a card under the band, so it scrolls away. */
.status-banner { display: grid; grid-template-columns: auto 1fr; gap: 0.5rem 0.75rem; margin-bottom: 1rem; padding: 1rem; border-radius: 16px; background: #FFFFFF; color: #15181C; }
.status-banner > form { grid-column: 1 / -1; }

/* Score card: the clock on top, then both teams with their kit stripe under the name */
.board { display: grid; gap: 0.875rem; padding: 1rem; border-radius: 16px; background: #FFFFFF; }
.board-clock-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.25rem 0.75rem; }
.board-time { font-size: 2rem; font-weight: 600; line-height: 1.1; color: #15181C; }
.board-teams { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
/* Subgrid lines up the names, the scores, the scorer fields and the buttons of both teams. */
.board-team { display: grid; grid-row: span 4; grid-template-rows: subgrid; gap: 0.5rem; padding: 0.75rem 0.5rem; border-radius: 12px; background: #F5F6F8; text-align: center; }
.board-team-name { align-self: center; justify-self: center; }
.board-team .field { margin-bottom: 0.25rem !important; text-align: left; }
.board-team-name { font-size: 1rem; font-weight: 500; line-height: 1.3; color: #15181C; }
.board-team-name .team-id { justify-content: center; }
.team-goals { font-size: 4rem; font-weight: 700; line-height: 1; color: #15181C; }
.plus-minus { display: grid; grid-template-columns: 3rem 1fr; gap: 0.5rem; }
.plus-minus .button { min-height: 3.25rem; padding-inline: 0.5rem; }
.plus-minus .button.is-dark { font-weight: 700; font-size: 1.0625rem; }

/* Penalties: each team with its shots, then its two buttons */
.penalty-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; font-weight: 500; color: #15181C; }
.penalty-row .team-goals { font-size: 2.5rem; }
.shots { display: flex; flex-wrap: wrap; gap: 0.25rem 0.75rem; min-height: 1.5rem; margin: 0.25rem 0 0.75rem; list-style: none; }
.shot.is-missed { color: #D92D20; font-weight: 700; }
.next-match .eyebrow { margin-bottom: 0.25rem; font-size: 0.9375rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #454C56; }
.next-match { margin-top: 1rem; }
.goal-row { flex-wrap: wrap; }
.external-link { gap: 0.375rem; }
.external-link .line-icon { width: 1.125rem; height: 1.125rem; }
/* Abrir and Copiar side by side when they fit, one above the other on a phone */
.button-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 0.5rem; margin-top: 0.75rem; }

/* Broadcast steps: a checklist */
.step { display: grid; grid-template-columns: 2rem 1fr; gap: 0.75rem; padding: 1rem; }
.step-icon {
  display: flex; align-items: center; justify-content: center; width: 1.75rem; height: 1.75rem;
  border-radius: 50%; box-shadow: inset 0 0 0 2px #E5E7EA; font-weight: 700; color: #454C56;
}
.step.is-current .step-icon { box-shadow: inset 0 0 0 2px #15181C; color: #15181C; }
.step.is-done .step-icon { background: #15181C; box-shadow: none; color: #FFFFFF; }
.step.is-live .step-icon { background: #D92D20; box-shadow: none; }
.step.is-live .step-icon::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #FFFFFF; }
.step.is-done { padding-block: 0.75rem; }
.step-title { font-size: 1.0625rem; font-weight: 600; color: #15181C; }
.step-text { color: #454C56; }
.step.is-live .step-text { color: #D92D20; font-weight: 600; }
.step-body > :is(form, a, button) { margin-top: 0.75rem; }

.video-frame { display: block; border-radius: 16px; overflow: hidden; background: #22272D; }
/* The label of the live video is a chip on its top-left corner; taps go through it to the player. */
.video-stage { position: relative; }
.video-badge { position: absolute; top: 0.75rem; left: 0.75rem; z-index: 1; pointer-events: none; }
/* Video map of the ads: one line per period with a dot at each ad's video minute; a ring is an ad sent by hand */
.ad-map-period + .ad-map-period, .ad-map-legend { margin-top: 0.75rem; padding-top: 0.75rem; }
.ad-map-legend { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9375rem; color: #454C56; }
.ad-map-legend > .is-manual { margin-left: 0.75rem; }
.ad-map-line { display: flex; align-items: center; gap: 0.75rem; min-height: 1.5rem; }
.ad-map-label { flex: none; width: 2rem; font-weight: 700; color: #15181C; }
.ad-map-track { position: relative; flex: 1; height: 4px; border-radius: 2px; background: #E5E7EA; }
.ad-map-dot { display: inline-block; flex: none; width: 14px; height: 14px; border-radius: 50%; background: #15181C; }
.ad-map-dot.is-manual { background: #FFFFFF; box-shadow: inset 0 0 0 3px #15181C; }
.ad-map-track > .ad-map-dot { position: absolute; top: 50%; transform: translate(-50%, -50%); outline: 2px solid #FFFFFF; }
.ad-map-ends { display: flex; justify-content: space-between; margin-left: 2.75rem; font-size: 0.9375rem; color: #454C56; font-variant-numeric: tabular-nums; }
.ad-map-list { margin-top: 0.25rem; list-style: none; }
.ad-map-list li { display: flex; align-items: center; gap: 0.5rem; min-height: 2rem; }
.ad-map-clock { flex: none; font-variant-numeric: tabular-nums; }

/* Ad cards: the whole card is the button; the image sits as on the video (a dark box, the stripe at its bottom) */
.ad-card-form { height: 100%; }
.ad-card { flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0.375rem; height: 100%; padding: 0.5rem; font-size: 1rem; line-height: 1.3; white-space: normal; text-align: left; }
.ad-card-media { display: flex; align-items: center; justify-content: center; aspect-ratio: 300 / 170; padding: 0.375rem; border-radius: 0.5rem; background: #454C56; overflow: hidden; }
.ad-card-media.is-inferior { align-items: flex-end; }
.ad-card-media img { min-width: 0; max-width: 100%; max-height: 100%; object-fit: contain; }
.ad-card-stripe { display: flex; align-items: center; gap: 0.375rem; width: 100%; height: 2rem; padding: 0.25rem 0.375rem; border-radius: 4px; background: #FFFFFF; color: #15181C; font-size: 0.9375rem; font-weight: 700; }
.ad-card-stripe img { flex: none; max-width: 60%; }
.ad-card-name { font-weight: 600; color: #15181C; overflow-wrap: anywhere; }
.ad-card .tags { gap: 0.25rem; margin: 0; }
/* A tag is white with a line, like the status chips, so it does not melt into the light card. */
.ad-card .tag { height: auto; margin: 0; padding: 0.125rem 0.5rem; border: 1px solid #E5E7EA; background: #FFFFFF; color: #15181C; font-size: 0.9375rem; white-space: normal; }
.ad-card small { font-size: 0.9375rem; color: #454C56; }
/* The ads list: the same box, never wider than the 300 px corner card plus its padding. */
.ad-preview { max-width: 19.5rem; }

/* A switch row, like iOS settings: the whole row is the button; the track is ink when on and gray when off */
.switch-row { display: flex; align-items: center; gap: 0.75rem; width: 100%; min-height: 3.25rem; padding: 0.5rem 1rem; border: 0; background: none; color: #15181C; font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.switch-row:focus-visible { outline: 2px solid #15181C; outline-offset: -4px; }
.switch-row-label { flex: 1; min-width: 0; }
.switch-row-state { display: block; color: #454C56; font-weight: 400; }
.switch { position: relative; flex: none; width: 3.25rem; height: 2rem; border-radius: 1rem; background: #7D8590; transition: background-color 0.2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 1px 3px rgba(21, 24, 28, 0.3); transition: transform 0.2s; }
[aria-checked="true"] > .switch { background: #15181C; }
[aria-checked="true"] > .switch::after { transform: translateX(1.25rem); }
/* While the tap is sending, the thumb already moves, so the staff see the change at once. */
.switch-form[aria-busy] .switch-row { cursor: progress; }
.switch-form[aria-busy] [aria-checked="false"] > .switch { background: #15181C; }
.switch-form[aria-busy] [aria-checked="false"] > .switch::after { transform: translateX(1.25rem); }
.switch-form[aria-busy] [aria-checked="true"] > .switch { background: #7D8590; }
.switch-form[aria-busy] [aria-checked="true"] > .switch::after { transform: none; }
@media (prefers-reduced-motion: reduce) { .switch, .switch::after { transition: none; } }

/* Bottom navigation in reach of the thumb, above the iPhone home bar; on a wide screen the tabs stay in the middle */
.tabbar {
  position: fixed; inset: auto 0 0; z-index: 40; display: grid; grid-template-columns: repeat(3, 1fr);
  padding: 0 max(0.25rem, calc(50vw - 22rem)) env(safe-area-inset-bottom); border-top: 1px solid #E5E7EA; background: #FFFFFF;
}
/* Bulma makes every section a block, which beat the hidden attribute. */
.tabbar[hidden], [role="tabpanel"][hidden] { display: none; }
main:has(.tabbar:not([hidden])) { padding-bottom: calc(11rem + env(safe-area-inset-bottom)); }
/* Each tab fills its whole cell, so no tap falls between two tabs; the selected pill sits behind the icon. */
.tab {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.25rem;
  min-height: 5rem; border: 0; background: none; color: #454C56; font: inherit; font-size: 0.9375rem; cursor: pointer;
}
.tab-indicator { display: flex; align-items: center; justify-content: center; width: 3.5rem; height: 2rem; border-radius: 1rem; }
.tab[aria-selected="true"] { color: #15181C; font-weight: 700; }
.tab[aria-selected="true"] .tab-indicator { background: #E5E7EA; }
.tab-dot { position: absolute; top: 0.75rem; left: calc(50% + 0.75rem); width: 10px; height: 10px; border-radius: 50%; background: #D92D20; box-shadow: 0 0 0 2px #FFFFFF; }

/* The main button of the moment floats above the tabs, at the right, like the mockup */
/* 22rem is half of Bulma's is-max-tablet column (705px). */
.main-action { position: fixed; z-index: 41; right: max(1rem, calc(50vw - 22rem)); bottom: calc(6rem + env(safe-area-inset-bottom)); }
.fab { gap: 0.625rem; min-height: 3.5rem; padding-inline: 1.25rem; border-radius: 16px; font-weight: 700; box-shadow: 0 4px 12px rgba(21, 24, 28, 0.25); }
