/*
 * Club UNIFUTBOL responsive foundation — 2026-09-19
 * Loaded after legacy sheets so fixed desktop dimensions cannot win again.
 */

html {
  max-width: 100%;
  overflow-x: hidden;
  scroll-padding-top: 150px;
}

body {
  min-width: 0 !important;
  max-width: 100%;
  overflow-x: hidden;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

img,
svg,
video,
canvas,
iframe {
  max-width: 100%;
}

img {
  height: auto;
}

#rt-top-surround,
#rt-mainbody-surround,
#rt-bottom,
#rt-footer,
#rt-drawer,
#rt-breadcrumbs {
  max-width: 100%;
  overflow-x: clip;
}

.rt-container,
body .rt-container {
  width: min(1430px, calc(100% - 48px)) !important;
  max-width: 100% !important;
  margin-right: auto !important;
  margin-left: auto !important;
}

#rt-main {
  width: 100%;
  min-width: 0;
}

#rt-main .rt-container {
  width: 100% !important;
  margin-right: 0 !important;
  margin-left: 0 !important;
}

#rt-main > .rt-container > [class*='rt-grid'],
#rt-mainbody,
#rt-sidebar-a,
#rt-sidebar-b,
#rt-sidebar-c,
.component-content,
.rt-block,
.module-surround,
.module-content,
.block-area,
.api-uf-view {
  min-width: 0;
  max-width: 100%;
}

a,
button,
input,
select,
textarea {
  -webkit-tap-highlight-color: rgba(254, 223, 84, 0.22);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #fedf54 !important;
  outline-offset: 3px !important;
}

[id] {
  scroll-margin-top: 150px;
}

#rt-main .api-uf-view .table-responsive,
#rt-main .api-uf-view .uf-responsive-table,
.api-uf-view .table-responsive,
.api-uf-view .uf-responsive-table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow: visible !important;
}

.api-uf-view .table-responsive > table,
.api-uf-view .uf-responsive-table > table {
  width: 100% !important;
  max-width: 100%;
  margin-right: 0 !important;
  margin-left: 0 !important;
  table-layout: auto;
}

.api-uf-view .table th,
.api-uf-view .table td {
  overflow-wrap: anywhere;
  white-space: normal;
}

/* The 8087 grid keeps the historical 1030 + 400 px columns. Its responsive
 * container is narrower than 1430 px once the browser scrollbar is present,
 * so only the outer columns become proportional; card geometry remains owned
 * by the historical component CSS. */
@media (min-width: 1200px) {
  #rt-main > .rt-container > .rt-grid-8 {
    width: 72% !important;
  }

  #rt-main > .rt-container > .rt-grid-4 {
    width: 28% !important;
  }
}

@media (max-width: 1199px) {
  html {
    scroll-padding-top: 24px;
  }

  [id] {
    scroll-margin-top: 24px;
  }

  #rt-main > .rt-container {
    display: block;
  }

  #rt-main > .rt-container > .rt-grid-8,
  #rt-main > .rt-container > .rt-grid-4,
  #rt-main > .rt-container > [class*='rt-grid'] {
    display: block;
    float: none !important;
    width: 100% !important;
  }

  .div-format-games {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    width: 100% !important;
  }

  .div-format-games .uf-folder {
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  .div-format-teamid .block-team .team-name a,
  .div-format-teamid .block-team .team-name span,
  .div-format-teamid .block-team .team-league {
    width: 100% !important;
    max-width: 100% !important;
    overflow-wrap: anywhere;
  }

  #rt-sidebar-a {
    clear: both;
    width: 100% !important;
  }

  .rt-container #rt-sidebar-a .rt-block.timeline-box {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    width: 100% !important;
    max-width: 100%;
    height: auto !important;
    max-height: none !important;
    margin: 70px 0 30px !important;
    overflow-y: visible !important;
    opacity: 1 !important;
  }

  .rt-container #rt-sidebar-a .rt-block.timeline-box .module-title {
    position: static !important;
    width: auto !important;
    margin: 0 !important;
  }

  #rt-mainbody-surround .home-rankings-sub-container,
  #rt-mainbody-surround .home-partidos-sub-container {
    margin-top: clamp(180px, 24vw, 260px) !important;
  }

  #rt-mainbody-surround .home-rankings-sub-container .block-area.api-uf-view,
  #rt-mainbody-surround .home-partidas-sub-container .block-area.api-uf-view,
  #rt-mainbody-surround .home-partidos-sub-container .block-area.api-uf-view {
    transform: none !important;
  }

  #rt-mainbody-surround .home-partidas-container {
    height: auto !important;
    min-height: 0;
    padding-top: clamp(190px, 24vw, 270px) !important;
  }

  #rt-mainbody-surround .home-partidas-sub-container {
    position: relative !important;
    inset: auto !important;
    margin: 0 !important;
  }

  #rt-mainbody-surround .home-partidas-sub-container .block-area.api-uf-view {
    margin-bottom: 0 !important;
  }

  #rt-mainbody-surround .home-block-sub-container.home-partidos-sub-container .uf-post-buttons {
    transform: none !important;
  }

  #rt-mainbody-surround div.home-block-container.home-salon-de-la-fama-container {
    margin-top: clamp(140px, 18vw, 220px) !important;
  }

}

/* Compact navigation is used for tablets as well as phones. */
@media (max-width: 1199px) {
  body {
    padding-top: 0 !important;
  }

  body.club-mobile-menu-open {
    overflow: hidden !important;
  }

  #rt-top-surround,
  header#rt-top-surround,
  header div#rt-top {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    height: auto !important;
  }

  header #rt-top > .rt-container {
    position: relative;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 88px;
    padding: 8px 16px;
  }

  header #rt-top > .rt-container > [class*='rt-grid'] {
    display: block;
    float: none !important;
    position: static !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  header #rt-top > .rt-container > .rt-grid-3 {
    grid-column: 1;
    grid-row: 1;
  }

  header #rt-top > .rt-container > .rt-grid-7 {
    grid-column: 2;
    grid-row: 1;
  }

  header #rt-top > .rt-container > .rt-omega {
    grid-column: 1 / -1;
    grid-row: 2;
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    margin-top: 6px !important;
    border-top: 1px solid rgba(124, 204, 239, 0.16);
  }

  header #rt-top > .rt-container > .rt-omega > .rt-block {
    display: block;
    float: none !important;
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Login and registration already have first-class entries in compact
   * navigation. Keep the account strip focused on session information; for a
   * guest, pintaUserHeader() still supplies its existing registration CTA. */
  header #rt-top > .rt-container > .rt-omega > .header-login {
    display: none !important;
  }

  header #rt-top .club-compact-user-header {
    display: grid !important;
    grid-template-columns: minmax(105px, 0.7fr) 82px minmax(145px, 1fr) minmax(190px, auto);
    grid-template-areas: 'identity profile points actions';
    align-items: center;
    gap: 10px;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 66px;
    margin: 0 !important;
    padding: 7px 0 5px !important;
    color: #fff;
  }

  header #rt-top .club-compact-user-header > h4 {
    grid-column: 1 / -1;
    margin: 0 !important;
    padding: 8px 0 !important;
    text-align: center;
    white-space: normal;
  }

  header #rt-top .club-compact-user-header > div {
    min-width: 0;
    margin: 0 !important;
    vertical-align: middle;
  }

  header #rt-top .club-header-identity {
    grid-area: identity;
    width: auto !important;
    text-align: left !important;
  }

  header #rt-top .club-header-identity .premium-block {
    position: static !important;
    left: auto !important;
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 3px 7px;
    width: 100%;
    min-width: 0;
    transform: none !important;
  }

  header #rt-top .club-header-identity .header-profile-username {
    order: -1;
    width: 100%;
    min-width: 0;
    margin: 0 !important;
    overflow: hidden;
    color: #fff !important;
    font-size: 15px !important;
    text-align: left !important;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  header #rt-top .club-header-identity img {
    width: auto !important;
    max-width: 74px;
    max-height: 24px;
    margin: 0 !important;
  }

  header #rt-top .club-header-identity .be-premium {
    width: auto !important;
    margin: 0 !important;
    padding: 3px 8px !important;
  }

  header #rt-top .club-header-profile {
    position: relative;
    grid-area: profile;
    width: 76px !important;
    height: 62px !important;
    overflow: visible !important;
    text-align: center;
  }

  header #rt-top .club-header-profile a.header-profile,
  header #rt-top .club-header-profile a.header-profile img {
    max-width: 100%;
  }

  header #rt-top .club-header-profile a.header-profile img {
    width: 52px !important;
    height: 52px !important;
  }

  header #rt-top .club-header-profile .uf-level-group-data {
    font-size: 9px;
  }

  header #rt-top .club-header-profile .hide-medium {
    display: block !important;
  }

  header #rt-top .club-header-profile > .uf-level {
    position: absolute !important;
    right: -1px;
    bottom: -1px;
    left: auto;
    width: 34px !important;
    height: 34px !important;
    transform: none !important;
  }

  header #rt-top .club-header-points {
    grid-area: points;
  }

  header #rt-top .club-header-points .table-header-points {
    width: 100%;
    max-width: 210px;
    margin: 0 !important;
  }

  header #rt-top .club-header-points .table-header-points tr:not(:last-child) {
    display: none;
  }

  header #rt-top .club-header-points .table-header-points td {
    padding: 2px 4px !important;
  }

  header #rt-top .club-header-points .table-header-points td:first-child span {
    width: auto !important;
    min-width: 82px;
  }

  header #rt-top .club-header-actions {
    grid-area: actions;
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 2px;
    width: auto !important;
    max-width: 100%;
  }

  header #rt-top .club-header-actions > .sub {
    flex: 0 0 44px;
    width: 44px !important;
    min-width: 44px;
    margin: 0 !important;
    padding: 5px 3px !important;
    text-align: center !important;
  }

  header #rt-top .club-header-actions > .club-header-envelopes {
    flex-basis: 44px;
    width: 44px !important;
  }

  header #rt-top .club-header-actions a {
    display: inline-flex;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
  }

  /* The legacy controls float beside the title and consequently overlap the
   * first ranking rows on narrow layouts. Give every control its own flow and
   * let Select2 negotiate the available line width. */
  .api-uf-view .filter-and-sort {
    float: none !important;
    clear: both;
    display: flex !important;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: flex-start;
    gap: 8px;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 9px 0 0 !important;
    padding: 0 !important;
  }

  .api-uf-view .filter-and-sort .membership-required {
    display: flex !important;
    flex: 1 1 100%;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
    max-width: 100%;
  }

  .api-uf-view .filter-and-sort .select2-container {
    flex: 1 1 180px;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  .api-uf-view .filter-and-sort .select2-selection--single {
    min-height: 38px;
  }

  .api-uf-view .filter-and-sort .select2-selection__rendered {
    line-height: 32px !important;
  }

  .api-uf-view .filter-and-sort .uf-button-extra {
    flex: 1 1 170px;
    min-width: 0;
    min-height: 44px;
    white-space: normal;
  }

  .api-uf-view > .table-responsive,
  .api-uf-view > .uf-responsive-table {
    clear: both;
  }

  .select2-container--open .select2-dropdown {
    box-sizing: border-box;
    max-width: calc(100vw - 24px);
  }

  #rt-top-surround > .gf-menu-toggle,
  #rt-top-surround .gf-menu-toggle,
  body > .gf-menu-toggle {
    display: none !important;
  }

  header #rt-top .logo-block,
  header #rt-top .logo-block .rt-block {
    margin: 0 !important;
    padding: 0 !important;
  }

  header #rt-top #rt-logo {
    width: min(235px, calc(100vw - 100px)) !important;
    max-width: 100%;
    height: 72px !important;
    margin: 0 !important;
    background-position: left center !important;
    background-size: contain !important;
  }

  /* The legacy mobile sheet makes .rt-grid-7 a positioned element with a
   * width equal to the toggle. Anchor the panel to the viewport so the menu
   * can never inherit that 60-80 px containing block. */
  html body header#rt-top-surround div#rt-top .menu-block {
    position: fixed !important;
    z-index: 10020;
    top: var(--club-compact-header-height, 88px) !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    max-width: none !important;
    max-height: calc(100vh - var(--club-compact-header-height, 88px)) !important;
    max-height: calc(100dvh - var(--club-compact-header-height, 88px)) !important;
    margin: 0 !important;
    padding: 8px clamp(12px, 4vw, 48px) 28px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    border-top: 1px solid rgba(124, 204, 239, 0.2);
    background: rgba(5, 21, 30, 0.99);
    box-shadow: 0 24px 42px rgba(0, 5, 10, 0.44);
  }

  /* Hide the compact navigation from the first CSS paint. Waiting for
     club-mobile-ready caused the complete menu to flash before defer JS ran. */
  header #rt-top:not(.club-mobile-open) .menu-block {
    display: none !important;
  }

  header #rt-top.club-mobile-open .menu-block {
    display: block !important;
  }

  header #rt-top .club-mobile-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: auto !important;
    min-width: 68px;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid rgba(132, 207, 239, 0.35);
    border-radius: 999px;
    background: rgba(13, 48, 65, 0.96);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.035em;
  }

  header #rt-top.club-mobile-open .club-mobile-toggle {
    border-color: #fedf54;
    color: #fedf54;
  }

  header #rt-top .menu-block > div,
  header #rt-top .gf-menu-device-container,
  header #rt-top .gf-menu-device-wrapper {
    height: auto !important;
    margin: 0 !important;
    overflow: visible !important;
  }

  html body header#rt-top-surround div#rt-top .gf-menu-device-container,
  html body header#rt-top-surround div#rt-top .gf-menu-device-wrapper {
    width: min(680px, 100%) !important;
    max-width: 100% !important;
    margin-right: auto !important;
    margin-left: auto !important;
  }

  header #rt-top .gf-menu,
  header #rt-top .gf-menu.l1 {
    position: static !important;
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 8px !important;
    background: transparent;
  }

  header #rt-top .gf-menu li {
    display: block !important;
    float: none !important;
    width: 100% !important;
  }

  header #rt-top .gf-menu .item {
    display: block !important;
    min-height: 44px;
    padding: 12px 15px !important;
    border-radius: 8px;
    white-space: normal;
    line-height: 20px !important;
  }

  header #rt-top .gf-menu > li + li {
    margin-top: 3px;
  }

  header #rt-top .gf-menu .dropdown,
  header #rt-top .gf-menu .column {
    position: static !important;
    display: block !important;
    width: 100% !important;
    max-width: 100%;
    opacity: 1 !important;
    border: 0 !important;
    background: rgba(255, 255, 255, 0.035) !important;
    box-shadow: none !important;
  }

  header #rt-top .gf-menu .dropdown .item {
    padding-left: 30px !important;
    color: #cce0e9 !important;
  }

  #rt-mainbody-surround {
    min-height: 0 !important;
  }

  #rt-mainbody-surround form#login-form {
    float: none !important;
    width: min(560px, 100%) !important;
    max-width: 100% !important;
    margin-right: auto !important;
    margin-left: auto !important;
  }

  /* Registration plans are fixed 250 px cards in the legacy component. At
   * tablet widths the third card was silently clipped by the page shell. */
  #rt-mainbody-surround .cb_template.cbRegistration .form-group#cbfr_cbregplans,
  #rt-mainbody-surround .cb_template.cbRegistration .form-group#cbfr_cbregplans .cb_field,
  #rt-mainbody-surround .cb_template.cbRegistration .form-group#cbfr_cbregplans .cb_field #cbfv_cbregplans,
  #rt-mainbody-surround .cb_template.cbRegistration .regPlansList,
  #rt-mainbody-surround .cb_template.cbRegistration .cbregPlansList {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  #rt-mainbody-surround .cb_template.cbRegistration .regPlansList,
  #rt-mainbody-surround .cb_template.cbRegistration .cbregPlansList {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  #rt-mainbody-surround .cb_template.cbRegistration .cbregPlan {
    float: none !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
  }
}

@media (max-width: 767px) {
  .rt-container,
  body .rt-container {
    width: calc(100% - 32px) !important;
  }

  header #rt-top > .rt-container {
    width: 100% !important;
  }

  header #rt-top #rt-logo {
    width: min(210px, calc(100vw - 100px)) !important;
    height: 68px !important;
  }

  header #rt-top .club-compact-user-header {
    grid-template-columns: 68px minmax(0, 1fr);
    grid-template-areas:
      'profile identity'
      'points points'
      'actions actions';
    gap: 7px 10px;
    min-height: 0;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
  }

  header #rt-top .club-header-profile {
    width: 68px !important;
  }

  header #rt-top .club-header-points .table-header-points {
    max-width: 100%;
  }

  header #rt-top .club-header-actions {
    justify-content: space-between;
    width: 100% !important;
    padding-top: 2px;
    border-top: 1px solid rgba(124, 204, 239, 0.12);
  }

  .api-uf-view .filter-and-sort .membership-required,
  .api-uf-view .filter-and-sort .select2-container,
  .api-uf-view .filter-and-sort .uf-button-extra {
    flex-basis: 100%;
    width: 100% !important;
  }

  .api-uf-view .filter-and-sort .select2-container {
    min-height: 42px;
  }

  .api-uf-view .filter-and-sort .select2-selection--single {
    min-height: 38px;
  }

  #rt-mainbody-surround {
    background-position: center top !important;
    background-size: auto 680px, 100% 100% !important;
  }

  body#home #rt-mainbody-surround {
    min-height: 0 !important;
  }

  #rt-mainbody-surround form#login-form {
    width: 100% !important;
    padding: 26px 20px 28px !important;
    border-radius: 16px !important;
  }

  #rt-main .rt-grid-8 > .rt-block,
  #rt-main .rt-grid-12 > .rt-block {
    margin-right: 0 !important;
    margin-left: 0 !important;
    padding-right: 0 !important;
    padding-left: 0 !important;
  }

  #rt-mainbody-surround form#login-form div.pretext h2,
  #rt-mainbody-surround .cb_template .cb-page-header-title,
  #rt-mainbody-surround div.home-block-container h2,
  #rt-mainbody-surround .rt-block .component-content h2[itemprop='name'] {
    font-size: clamp(29px, 9vw, 38px) !important;
    line-height: 1.1 !important;
    overflow-wrap: anywhere;
  }

  #rt-mainbody-surround form#login-form div.pretext > p.subtitle {
    font-size: 17px !important;
    line-height: 1.35 !important;
  }

  #rt-mainbody-surround form#login-form input[type='text'],
  #rt-mainbody-surround form#login-form input[type='password'] {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 46px;
    font-size: 16px !important;
  }

  div.home-block-container {
    float: none !important;
    width: 100%;
    margin-top: 82px !important;
  }

  #rt-mainbody-surround div.home-block-container.home-podio-container::after,
  #rt-mainbody-surround div.home-block-container.home-partidos-container::after,
  #rt-mainbody-surround .home-rankings-sub-container::before,
  #rt-mainbody-surround .home-partidos-sub-container::before {
    content: none !important;
    display: none !important;
  }

  #rt-mainbody-surround .home-rankings-container,
  #rt-mainbody-surround .home-partidas-container,
  #rt-mainbody-surround .home-partidos-container {
    box-sizing: border-box;
    width: 100%;
    height: auto !important;
    min-height: 0;
    padding-top: 150px !important;
    background-position: center top !important;
    background-size: min(560px, 100%) auto !important;
  }

  #rt-mainbody-surround .home-rankings-sub-container,
  #rt-mainbody-surround .home-partidos-sub-container {
    margin-top: 0 !important;
  }

  #rt-mainbody-surround .home-partidas-sub-container,
  #rt-mainbody-surround .home-partidos-sub-container,
  #rt-mainbody-surround .home-rankings-sub-container {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    max-width: 100%;
    background-image: none !important;
  }

  #rt-mainbody-surround div.home-block-container.home-salon-de-la-fama-container {
    margin-top: 96px !important;
    margin-bottom: 50px !important;
  }

  #rt-mainbody-surround div.home-block-container.home-salon-de-la-fama-container::before {
    height: 480px !important;
    opacity: 0.4;
    background-size: cover !important;
    transform: none !important;
  }

  .div-format-games {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .div-format-games,
  .home-partidas-sub-container .block-area,
  .home-partidas-sub-container .uf-folder-wrapper,
  .home-partidas-sub-container .div-format-username {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  html.uf-design-4-podium body .block-area.api-uf-view #uf-podium .grid-container,
  html.uf-design-4-podium body .block-area.api-uf-view #uf-hall-of-fame .grid-container {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 76px !important;
  }

  html.uf-design-4-podium body .block-area.api-uf-view #uf-podium .dark-background,
  html.uf-design-4-podium body .block-area.api-uf-view #uf-hall-of-fame .dark-background {
    flex: 0 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    transform: none !important;
  }

  html.uf-design-4-podium body .block-area.api-uf-view #uf-podium .dark-background:nth-child(2),
  html.uf-design-4-podium body .block-area.api-uf-view #uf-hall-of-fame .dark-background:nth-child(2) {
    transform: none !important;
  }

  .block-area.api-uf-view #uf-podium,
  .block-area.api-uf-view #uf-hall-of-fame {
    margin-top: 90px !important;
  }

  .block-area.api-uf-view #uf-podium .dark-background .copas,
  .block-area.api-uf-view #uf-hall-of-fame .dark-background .copas {
    width: auto;
    max-width: min(250px, 78vw);
    max-height: 190px;
    margin-right: auto;
    margin-left: auto;
  }

  .block-area.api-uf-view #uf-podium .dark-background h2,
  .block-area.api-uf-view #uf-hall-of-fame .dark-background h2 {
    font-size: clamp(72px, 24vw, 104px) !important;
  }

  .block-area.api-uf-view #uf-podium .dark-background .gold,
  .block-area.api-uf-view #uf-hall-of-fame .dark-background .gold {
    font-size: clamp(84px, 28vw, 118px) !important;
  }

  .block-area.api-uf-view #uf-podium .dark-background .name a,
  .block-area.api-uf-view #uf-hall-of-fame .dark-background .name a {
    font-size: clamp(26px, 8vw, 36px) !important;
  }

  .block-area.api-uf-view #uf-hall-of-fame .info,
  .block-area.api-uf-view #uf-hall-of-fame .lista-titulos {
    margin-right: 8px !important;
    margin-left: 8px !important;
    font-size: 14px;
  }

  #rt-main .api-uf-view .table-responsive,
  #rt-main .api-uf-view .uf-responsive-table,
  .api-uf-view .table-responsive,
  .api-uf-view .uf-responsive-table {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 14px 0;
    overflow: visible !important;
  }

  .api-uf-view .table-responsive > table.uf-mobile-data-table,
  .api-uf-view .uf-responsive-table > table.uf-mobile-data-table {
    display: block;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100%;
    background: transparent !important;
  }

  .api-uf-view table.uf-mobile-data-table thead {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
  }

  .api-uf-view table.uf-mobile-data-table tbody {
    display: grid;
    gap: 14px;
    width: 100%;
  }

  .api-uf-view table.uf-mobile-data-table tbody tr {
    display: block;
    width: 100%;
    overflow: hidden;
    border: 1px solid rgba(132, 207, 240, 0.24);
    border-radius: 12px;
    background: rgba(4, 24, 35, 0.72);
    box-shadow: 0 8px 20px rgba(0, 11, 21, 0.2);
  }

  .api-uf-view table.uf-mobile-data-table tbody td,
  .api-uf-view table.uf-mobile-data-table tbody th {
    display: grid !important;
    grid-template-columns: minmax(105px, 38%) minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    box-sizing: border-box;
    width: 100% !important;
    max-width: 100%;
    min-height: 44px;
    text-align: left !important;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .api-uf-view table.uf-mobile-data-table tbody td::before,
  .api-uf-view table.uf-mobile-data-table tbody th::before {
    content: attr(data-label);
    color: #fedf54;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.25;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  .api-uf-view table.uf-mobile-data-table tbody td.uf-mobile-result-cell {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 8px;
  }

  .api-uf-view table.uf-mobile-data-table tbody td.uf-mobile-result-cell .block-team.team-result {
    justify-self: stretch;
    width: 100% !important;
    min-width: 0;
    max-width: 100%;
  }

  /* Rebuild the legacy float/absolute-position score strip as a bounded grid.
   * This keeps both crests, team names and scores visible at 320 px. */
  html body .api-uf-view table.uf-mobile-data-table tbody td.uf-mobile-result-cell .block-team.team-result {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    overflow: hidden;
    border-radius: 10px;
  }

  html body .api-uf-view .block-team.team-result .team-name {
    position: relative;
    display: grid !important;
    float: none !important;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    align-items: center;
    width: 100% !important;
    min-width: 0;
    min-height: 40px;
  }

  html body .api-uf-view .block-team.team-result .team-name.visitor {
    grid-template-columns: auto minmax(0, 1fr) 30px;
  }

  html body .api-uf-view .block-team.team-result .team-name .shell {
    grid-column: 1;
    grid-row: 1;
    float: none !important;
    width: 30px;
    height: 30px;
    margin: 0;
    transform: none !important;
  }

  html body .api-uf-view .block-team.team-result .team-name.visitor .shell {
    grid-column: 3;
  }

  html body .api-uf-view .block-team.team-result .team-name .shell img {
    display: block;
    width: 22px;
    height: 22px;
    margin: 2px auto 0;
    object-fit: contain;
    transform: none !important;
  }

  html body .api-uf-view .block-team.team-result .team-name a,
  html body .api-uf-view .block-team.team-result .team-name span:not(.penaltys) {
    position: static !important;
    grid-column: 2;
    grid-row: 1;
    width: auto !important;
    min-width: 0;
    height: auto !important;
    padding: 0 4px !important;
    overflow: hidden;
    background: transparent;
    font-size: 12px;
    line-height: 1.25;
    text-overflow: ellipsis;
    transform: none !important;
  }

  html body .api-uf-view .block-team.team-result .team-name.visitor a,
  html body .api-uf-view .block-team.team-result .team-name.visitor span:not(.penaltys) {
    text-align: right;
  }

  html body .api-uf-view .block-team.team-result .team-name .result-goals,
  html body .api-uf-view .block-team.team-result .team-name.visitor .result-goals {
    display: flex;
    float: none !important;
    grid-column: 3;
    grid-row: 1;
    align-items: center;
    align-self: stretch;
    justify-content: center;
    min-width: 34px;
    margin: 0 !important;
    padding: 0 7px !important;
    font-size: 24px;
    line-height: 1;
  }

  html body .api-uf-view .block-team.team-result .team-name.visitor .result-goals {
    grid-column: 1;
  }

  .api-uf-view .uf-pre-buttons {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    width: 100% !important;
    max-width: 100%;
  }

  .api-uf-view .uf-pre-buttons > .uf-button,
  .api-uf-view .uf-pre-buttons > .uf-button-group {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: auto !important;
    min-width: 0 !important;
    min-height: 44px;
    margin: 0 !important;
    padding: 8px 10px !important;
    white-space: normal !important;
    line-height: 1.2 !important;
    text-align: center;
  }

  .api-uf-view .uf-pre-buttons > :only-child,
  .api-uf-view .uf-pre-buttons > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  #rt-mainbody-surround .component-content p,
  #rt-mainbody-surround .component-content li,
  #rt-mainbody-surround .api-uf-view p,
  #rt-mainbody-surround .api-uf-view li {
    overflow-wrap: anywhere;
  }

  #rt-mainbody-surround input:not([type='checkbox']):not([type='radio']),
  #rt-mainbody-surround select,
  #rt-mainbody-surround textarea,
  #rt-mainbody-surround button {
    max-width: 100%;
  }

  .api-uf-view .pre-data iframe[id^='club-youtube-player-'] {
    display: block;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
    margin-right: auto;
    margin-left: auto;
  }

  #rt-mainbody-surround .cb_template.cbRegistration form,
  #rt-mainbody-surround #cbcheckedadminForm {
    width: 100% !important;
    max-width: 100%;
  }

  html body #rt-mainbody-surround div.cb_template.cbRegistration form#cbcheckedadminForm {
    padding: 28px 18px !important;
  }

  #cbcheckedadminForm div.form-group,
  #rt-mainbody-surround .cb_template.cbRegistration .form-group,
  #rt-mainbody-surround .cb_template.cbProfile .form-group:not(.cbft_image) {
    display: block !important;
    float: none !important;
    width: 100% !important;
    max-width: 100%;
    margin-right: 0 !important;
    margin-left: 0 !important;
  }

  #cbcheckedadminForm div.form-group label,
  #rt-mainbody-surround .cb_template.cbProfile .form-group label,
  #rt-mainbody-surround .cb_template.cbRegistration .form-group label {
    display: block !important;
    float: none !important;
    width: 100% !important;
    max-width: 100%;
    margin: 0 0 7px !important;
    white-space: normal !important;
    line-height: 1.35;
  }

  #cbcheckedadminForm div.form-group div.cb_field,
  #rt-mainbody-surround .cb_template.cbProfile .form-group div.cb_field,
  #rt-mainbody-surround .cb_template.cbRegistration .form-group div.cb_field {
    display: block !important;
    float: none !important;
    width: 100% !important;
    max-width: 100%;
  }

  html body #rt-mainbody-surround .cb_template.cbRegistration form .form-group > label,
  html body #rt-mainbody-surround .cb_template.cbRegistration form .form-group > .cb_field {
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
  }

  html body #rt-mainbody-surround div.cb_template.cbRegistration form#cbcheckedadminForm #cbfr_cbregplans > label,
  html body #rt-mainbody-surround div.cb_template.cbRegistration form#cbcheckedadminForm #cbfr_cbregplans > .cb_field,
  html body #rt-mainbody-surround div.cb_template.cbRegistration form#cbcheckedadminForm #cbfr_cbregplans #cbfv_cbregplans,
  html body #rt-mainbody-surround div.cb_template.cbRegistration form#cbcheckedadminForm #cbfr_cbregplans .regPlansList,
  html body #rt-mainbody-surround div.cb_template.cbRegistration form#cbcheckedadminForm #cbfr_cbregplans .cbregPlansList {
    flex: 0 0 100% !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  #rt-mainbody-surround .cb_template.cbRegistration .form-group input:not([type='checkbox']):not([type='radio']),
  #rt-mainbody-surround .cb_template.cbRegistration .form-group select,
  #rt-mainbody-surround .cb_template.cbRegistration .form-group textarea {
    width: 100% !important;
    max-width: 100% !important;
  }

  #rt-mainbody-surround .cb_template.cbRegistration .form-group#cbfr_cbregplans .cb_field,
  #rt-mainbody-surround .cb_template.cbRegistration .form-group#cbfr_cbregplans .cb_field #cbfv_cbregplans,
  #rt-mainbody-surround .cb_template .regPlansList {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    width: 100% !important;
    max-width: 100% !important;
  }

  #rt-mainbody-surround .cb_template .cbregPlan {
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  #rt-mainbody-surround .cb_template.cbRegistration .regPlansList,
  #rt-mainbody-surround .cb_template.cbRegistration .cbregPlansList {
    grid-template-columns: minmax(0, 1fr);
  }

  .rt-container #rt-sidebar-a .rt-block.timeline-box {
    margin-top: 70px !important;
    padding: 0 8px 12px !important;
  }

  #rt-sidebar-a .uf-activity-user-line,
  #rt-sidebar-a .streamMoreContainer .btn,
  #rt-sidebar-a .uf-activity-user-line > * {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  #rt-footer {
    height: auto !important;
    min-height: 0;
    padding: 42px 20px 36px !important;
    background-size: cover !important;
  }

  #rt-footer .custom {
    display: block;
  }

  #rt-footer .rt-container .rt-grid-12 .info-container {
    display: block !important;
    width: 100% !important;
    margin: 22px 0 0;
    text-align: center !important;
  }

  #cookie-banner .msg {
    gap: 12px;
    padding: 14px 16px !important;
    font-size: 13px;
    line-height: 1.45;
  }

  #cookie-banner .actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  #cookie-banner .actions button {
    min-width: 92px;
    min-height: 44px;
  }
}

@media (max-width: 420px) {
  .rt-container,
  body .rt-container {
    width: calc(100% - 24px) !important;
  }

  header #rt-top > .rt-container {
    width: 100% !important;
    padding-right: 12px;
    padding-left: 12px;
  }

  header #rt-top #rt-logo {
    width: min(195px, calc(100vw - 92px)) !important;
    height: 64px !important;
  }

  header #rt-top .club-mobile-toggle {
    min-width: 62px;
    min-height: 44px;
    padding-inline: 11px;
    font-size: 12px;
  }

  /* On the narrowest screens keep the primary status and envelope actions in
     one row. Medals remain available from the achievements action. */
  header #rt-top .club-header-actions > .club-header-medal {
    display: none !important;
  }

  #rt-mainbody-surround form#login-form {
    padding-top: 26px !important;
    padding-bottom: 28px !important;
    padding-right: 16px !important;
    padding-left: 16px !important;
  }

}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
