/*
 * 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(130px, 160px) 82px minmax(150px, 180px) minmax(190px, 220px);
    grid-template-areas: 'identity profile points actions';
    align-items: center;
    justify-content: 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, 200px);
    grid-template-areas:
      'profile identity'
      'points points'
      'actions actions';
    justify-content: center;
    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 .api-uf-view.user-welcome::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 .api-uf-view.user-welcome {
    position: relative;
    z-index: 2;
    float: none !important;
    box-sizing: border-box;
    width: 100% !important;
    max-width: 650px;
    padding-right: 10px !important;
    padding-left: 10px !important;
    margin-right: auto !important;
    margin-left: auto !important;
  }

  #rt-mainbody-surround .api-uf-view.user-welcome .user-welcome-block {
    box-sizing: border-box;
    width: 100%;
    isolation: isolate;
  }

  #rt-mainbody-surround div.home-block-container.home-podio-container {
    clear: both;
  }

  #rt-mainbody-surround div.home-block-container.home-podio-container > h2 {
    display: block;
    width: 100% !important;
    max-width: 100%;
    word-break: normal;
    overflow-wrap: normal;
  }

  #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;
  }

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

}

/* Compact account header: one centred identity block, a complete action rail
   and a persistent logo/menu bar while the page scrolls. Desktop is untouched. */
@media (max-width: 1199px) {
  html body.layout-mode-responsive header#rt-top-surround {
    position: fixed !important;
    z-index: 10015;
    top: 0 !important;
    right: 0 !important;
    left: 0 !important;
    width: 100%;
    background: #061720 !important;
    background-image: none !important;
    background-repeat: no-repeat !important;
    box-shadow: 0 1px 0 rgba(67, 155, 194, 0.22);
  }

  html.club-responsive-ready body.layout-mode-responsive {
    padding-top: var(--club-compact-header-height, 88px) !important;
  }

  html body.layout-mode-responsive header#rt-top-surround #rt-top,
  html body.layout-mode-responsive header#rt-top-surround #rt-top > .rt-container,
  html body.layout-mode-responsive header#rt-top-surround #rt-top > .rt-container > .rt-omega {
    background: #061720 !important;
    background-image: none !important;
    background-repeat: no-repeat !important;
  }

  header #rt-top > .rt-container > .rt-omega {
    max-height: 220px;
    overflow: hidden !important;
    opacity: 1;
  }

  header #rt-top.club-compact-scrolled > .rt-container > .rt-omega {
    max-height: 0;
    margin-top: 0 !important;
    border-top: 0 !important;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
  }

  header #rt-top.club-compact-scrolled > .rt-container {
    box-shadow: 0 8px 24px rgba(0, 7, 12, 0.34);
  }

  header #rt-top .club-compact-user-header {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 104px clamp(169px, 24vw, 220px) minmax(0, 1fr);
    grid-template-rows: 56px 24px auto;
    grid-template-areas: none;
    align-items: stretch;
    justify-content: stretch;
    column-gap: 0;
    row-gap: 0;
    width: 100% !important;
    min-height: 0;
    padding: 10px 0 0 !important;
    background: #061720 !important;
    background-image: none !important;
    text-align: left;
  }

  header #rt-top .club-compact-user-header > h4 {
    grid-column: 1 / -1;
    grid-row: 1 / 4;
    align-self: center;
  }

  header #rt-top .club-header-profile {
    position: relative !important;
    grid-area: auto !important;
    grid-column: 2 !important;
    grid-row: 1 / 3 !important;
    display: grid !important;
    grid-template-rows: 56px 24px;
    align-items: center;
    justify-items: center;
    width: 100% !important;
    height: 80px !important;
    padding: 0 !important;
  }

  header #rt-top .club-header-profile a.header-profile {
    grid-row: 1;
    align-self: center;
    justify-self: center;
    margin: 0 !important;
  }

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

  header #rt-top .club-header-profile .uf-level-group-data {
    grid-row: 2;
    display: flex !important;
    position: static !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    width: max-content !important;
    max-width: none;
    height: 24px;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
    overflow: visible;
    font-size: 9px;
    line-height: 24px;
    transform: none !important;
    white-space: nowrap;
  }

  header #rt-top .club-header-profile .uf-level-group-data > div {
    margin: 0 !important;
    padding: 0 3px !important;
  }

  header #rt-top .club-header-profile > .uf-level {
    top: 24px !important;
    right: 2px !important;
    bottom: auto !important;
    left: auto !important;
  }

  header #rt-top .club-header-identity {
    grid-area: auto !important;
    grid-column: 3 !important;
    grid-row: 1 !important;
    display: flex !important;
    height: 56px !important;
    align-items: center;
    width: 100% !important;
    padding-left: 8px !important;
  }

  header #rt-top .club-header-identity .premium-block {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-content: center;
    align-items: center;
    gap: 2px 6px;
    width: 100%;
    height: 56px;
  }

  header #rt-top .club-header-identity .header-profile-username {
    grid-column: 1 / -1;
    grid-row: 1;
    width: 100%;
    font-size: 15px !important;
    line-height: 20px;
  }

  header #rt-top .club-header-identity .header-profile-premium {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: start;
  }

  header #rt-top .club-header-identity img.no-premium {
    grid-column: 1;
    grid-row: 2;
  }

  header #rt-top .club-header-identity .be-premium {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
    max-width: 138px;
    padding: 3px 7px 4px !important;
    font-size: 9px !important;
    line-height: 13px !important;
    text-align: center;
  }

  header #rt-top .club-header-points {
    grid-area: auto !important;
    grid-column: 3 !important;
    grid-row: 2 !important;
    display: flex !important;
    height: 24px;
    align-items: center;
    width: 100% !important;
    padding-left: 8px !important;
  }

  header #rt-top .club-header-points .table-header-points {
    width: 100% !important;
    max-width: none;
    height: 24px;
    table-layout: fixed;
  }

  header #rt-top .club-header-points .table-header-points td {
    height: 24px;
    padding: 0 4px !important;
    vertical-align: middle;
    line-height: 20px;
  }

  header #rt-top .club-header-actions {
    grid-area: auto !important;
    grid-column: 1 / -1 !important;
    grid-row: 3 !important;
    display: grid !important;
    grid-template-columns: repeat(8, minmax(34px, 44px));
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 100% !important;
    max-width: none;
    margin: 10px 0 0 !important;
    padding: 7px 4px 8px !important;
    border-top: 1px solid rgba(101, 188, 225, 0.18);
    background: #0b2634 !important;
  }

  header #rt-top .club-header-actions > .sub,
  header #rt-top .club-header-actions > .club-header-envelopes {
    display: block !important;
    width: auto !important;
    min-width: 0;
    margin: 0 !important;
    padding: 3px 0 !important;
    text-align: center !important;
  }

  header #rt-top .club-header-actions a {
    width: 100%;
    min-width: 34px;
    min-height: 44px;
  }

  header #rt-top .club-header-actions > .club-header-achievements > .user-header-box.uf-popover {
    transform: translate(15px, 5px) !important;
  }

  header #rt-top .club-mobile-toggle {
    width: 56px !important;
    min-width: 56px;
    height: 50px;
    min-height: 50px;
    padding: 0 !important;
    border: 3px solid #0a3c5c;
    border-radius: 18px;
    background: rgba(8, 39, 54, 0.96);
    color: #f7f9fa;
  }

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

  header #rt-top .club-mobile-toggle-icon {
    display: grid;
    gap: 5px;
    place-items: center;
  }

  header #rt-top .club-mobile-toggle-icon > span {
    display: block;
    width: 25px;
    height: 4px;
    border-radius: 4px;
    background: currentColor;
    transition: opacity 160ms ease, transform 160ms ease;
  }

  header #rt-top.club-mobile-open .club-mobile-toggle-icon > span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }

  header #rt-top.club-mobile-open .club-mobile-toggle-icon > span:nth-child(2) {
    opacity: 0;
  }

  header #rt-top.club-mobile-open .club-mobile-toggle-icon > span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }
}


/* Responsive revision — beta feedback 2026-09-21. */

/* Card galleries use the real available width. This yields three columns in
   the full desktop content area, two in portrait tablets and one on phones. */
.api-uf-view .opening-cards-enviroment {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 300px));
  justify-content: space-between;
  justify-items: center;
  align-items: start;
  gap: 26px 12px;
  width: 100% !important;
  max-width: 100%;
  padding: 18px 0 28px;
}

.block-area.api-uf-view#tableStriped .opening-cards-enviroment .cardContainer,
.block-area.api-uf-view#tableStriped .opening-cards-enviroment .cardContainer:nth-child(3n),
.block-area.api-uf-view#tableStriped .opening-cards-enviroment .cardContainer:nth-child(3n+1) {
  margin: 0 !important;
  box-sizing: border-box !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 300px !important;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: 3 / 4;
  justify-self: center;
}

@media (max-width: 1199px) {
  html body header#rt-top-surround div#rt-top .menu-block,
  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,
  html body header#rt-top-surround div#rt-top .gf-menu {
    border-color: #168bc4 !important;
  }

  html body.layout-mode-responsive header#rt-top-surround div#rt-top .gf-menu-device-container {
    padding: 3px !important;
    border-radius: 8px;
    background: #168bc4 !important;
  }

  html body.layout-mode-responsive header#rt-top-surround div#rt-top .gf-menu,
  html body.layout-mode-responsive header#rt-top-surround div#rt-top .gf-menu.l1 {
    background: linear-gradient(rgba(20, 48, 64, 0.96), rgba(6, 22, 31, 0.98)) !important;
  }
}

@media (min-width: 680px) and (max-width: 991px) {
  .api-uf-view .opening-cards-enviroment {
    grid-template-columns: repeat(2, minmax(0, 300px));
    justify-content: space-evenly;
    column-gap: 12px;
  }
}

@media (max-width: 679px) {
  .api-uf-view .opening-cards-enviroment {
    grid-template-columns: minmax(0, 300px);
    justify-content: center !important;
    justify-items: center;
  }
}

/* At tablet widths the wide legacy trophy table becomes the same accessible
   labelled-card pattern already used on phones. */
@media (max-width: 900px) {
  html body .popover.qtip-modal.uf-activity-image-tooltip {
    position: fixed !important;
    inset: 12px !important;
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    transform: none !important;
  }

  html body .popover.qtip-modal.uf-activity-image-tooltip .popover-body {
    width: 100% !important;
    max-width: 100%;
    max-height: calc(100dvh - 86px) !important;
    margin-top: 16px !important;
    overflow: auto !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  html body .popover.qtip-modal.uf-activity-image-tooltip img.uf-activity-image-inside {
    display: block;
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 auto;
  }

  .uf-view-ranking_user_trophys .table-responsive,
  .uf-view-ranking_trophys .table-responsive {
    margin: 14px 0 !important;
    overflow: visible !important;
  }

  .uf-view-ranking_user_trophys table.uf-mobile-data-table,
  .uf-view-ranking_trophys table.uf-mobile-data-table,
  .uf-view-ranking_user_trophys table.uf-mobile-data-table tbody,
  .uf-view-ranking_trophys table.uf-mobile-data-table tbody {
    display: grid !important;
    width: 100% !important;
    min-width: 0 !important;
    gap: 14px;
    background: transparent !important;
  }

  .uf-view-ranking_user_trophys table.uf-mobile-data-table thead,
  .uf-view-ranking_trophys 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;
  }

  .uf-view-ranking_user_trophys table.uf-mobile-data-table tbody tr,
  .uf-view-ranking_trophys table.uf-mobile-data-table tbody tr {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    overflow: hidden;
    border: 1px solid rgba(132, 207, 240, 0.3);
    border-radius: 12px;
    background: rgba(4, 24, 35, 0.78);
    box-shadow: 0 8px 20px rgba(0, 11, 21, 0.2);
  }

  .uf-view-ranking_user_trophys table.uf-mobile-data-table tbody td,
  .uf-view-ranking_trophys table.uf-mobile-data-table tbody td {
    display: grid !important;
    grid-template-columns: minmax(112px, 38%) minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    width: 100% !important;
    min-height: 42px;
    padding: 8px 12px !important;
    text-align: left !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
  }

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

@media (max-width: 767px) {
  /* Compact match cards: competition/time, score and the three point values
     occupy one row each. Labels are redundant in this constrained layout. */
  .uf-view-ranking_matches table.uf-mobile-data-table tbody,
  .uf-view-ranking_user_matches table.uf-mobile-data-table tbody {
    gap: 18px !important;
  }

  .uf-view-ranking_matches table.uf-mobile-data-table tbody tr,
  .uf-view-ranking_user_matches table.uf-mobile-data-table tbody tr {
    display: flex !important;
    flex-wrap: wrap;
    gap: 0;
    padding: 9px 10px 10px;
  }

  .uf-view-ranking_matches table.uf-mobile-data-table tbody td,
  .uf-view-ranking_user_matches table.uf-mobile-data-table tbody td {
    display: flex !important;
    min-width: 0;
    min-height: 0;
    padding: 7px 6px !important;
    border: 0 !important;
  }

  .uf-view-ranking_matches table.uf-mobile-data-table tbody td::before,
  .uf-view-ranking_user_matches table.uf-mobile-data-table tbody td::before {
    display: none !important;
  }

  .uf-view-ranking_matches .uf-field-username,
  .uf-view-ranking_user_matches .uf-field-username {
    order: 0;
    flex: 1 0 100%;
    font-weight: 700;
  }

  .uf-view-ranking_matches .uf-field-idcompeticion,
  .uf-view-ranking_user_matches .uf-field-idcompeticion {
    order: 1;
    flex: 1 1 64%;
    align-items: center;
    color: #fedf54;
    font-weight: 700;
  }

  .uf-view-ranking_matches .uf-field-created,
  .uf-view-ranking_user_matches .uf-field-created {
    order: 2;
    flex: 0 1 36%;
    align-items: center;
    justify-content: flex-end;
    color: rgba(255, 255, 255, 0.78);
    font-size: 12px;
    text-align: right !important;
  }

  .uf-view-ranking_matches .uf-field-idlocal,
  .uf-view-ranking_user_matches .uf-field-idlocal {
    order: 3;
    flex: 1 0 100%;
    padding: 3px 0 7px !important;
  }

  .uf-view-ranking_matches .uf-field-pts_fidelity,
  .uf-view-ranking_matches .uf-field-pts_successes,
  .uf-view-ranking_matches .uf-field-pts_difficulty,
  .uf-view-ranking_user_matches .uf-field-pts_fidelity,
  .uf-view-ranking_user_matches .uf-field-pts_successes,
  .uf-view-ranking_user_matches .uf-field-pts_difficulty {
    order: 4;
    flex: 1 1 33.333%;
    align-items: center;
    justify-content: center;
    min-width: 0;
    border-top: 1px solid rgba(132, 207, 240, 0.16) !important;
    text-align: center !important;
  }

  .uf-view-ranking_matches .uf-field-pts_fidelity > *,
  .uf-view-ranking_matches .uf-field-pts_successes > *,
  .uf-view-ranking_matches .uf-field-pts_difficulty > *,
  .uf-view-ranking_user_matches .uf-field-pts_fidelity > *,
  .uf-view-ranking_user_matches .uf-field-pts_successes > *,
  .uf-view-ranking_user_matches .uf-field-pts_difficulty > * {
    width: auto !important;
    max-width: 100%;
    margin: 0 auto !important;
  }

  /* Legacy game tiles used transforms and zero effective row spacing. */
  .div-format-games {
    row-gap: 24px !important;
  }

  .div-format-games .uf-folder {
    margin: 0 0 2px !important;
  }

  /* Collections keep their cover and all metadata inside the card. */
  .div-format-collections {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    gap: 34px;
    width: 100%;
    margin-top: 28px !important;
  }

  .div-format-collections .uf-collection,
  .div-format-collections .uf-collection:nth-last-child(-n+2) {
    display: grid !important;
    grid-template-columns: minmax(105px, 38%) minmax(0, 1fr);
    align-items: center;
    width: 100% !important;
    height: auto !important;
    min-height: 205px;
    margin: 0 !important;
    padding: 14px 12px;
    overflow: visible;
  }

  .div-format-collections .uf-collection .uf-collection-link {
    align-self: center;
    transform: none !important;
  }

  .div-format-collections .uf-collection .uf-collection-link img {
    display: block;
    width: 100% !important;
    max-width: 170px !important;
    margin: 0 auto;
  }

  .div-format-collections .uf-collection-wrapper {
    display: flex !important;
    flex-direction: column;
    align-self: stretch;
    justify-content: center;
    width: 100% !important;
    height: auto !important;
    min-width: 0;
    padding: 4px 0 4px 10px;
    transform: none !important;
  }

  .div-format-collections .uf-collection .div-format-field {
    float: none !important;
    clear: none !important;
    width: 100%;
    max-width: 100%;
    white-space: normal !important;
    overflow-wrap: anywhere;
  }

  .div-format-collections .uf-collection .div-format-name {
    margin-bottom: 10px !important;
    font-size: 14px !important;
  }

  .div-format-collections .uf-collection .div-format-button {
    margin: 12px 0 0 !important;
  }

  .div-format-collections .uf-collection .div-format-button .uf-button {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    min-height: 38px;
    padding: 7px 9px !important;
    white-space: normal;
    text-align: center;
  }

  /* Account/profile data can contain a single digit or a long collection
     list. Both columns therefore need an explicit shrinkable grid. */
  html body #rt-mainbody-surround .cb_template.cbProfile .uf-profile-fieldset dl.dl-horizontal {
    display: grid !important;
    grid-template-columns: minmax(104px, 42%) minmax(0, 1fr);
    grid-auto-flow: row;
    gap: 7px 12px;
    width: 100% !important;
    min-width: 0;
    max-width: 100%;
    margin: 0 !important;
    padding: 10px !important;
  }

  html body #rt-mainbody-surround .cb_template.cbProfile .uf-profile-fieldset dl.dl-horizontal::before,
  html body #rt-mainbody-surround .cb_template.cbProfile .uf-profile-fieldset dl.dl-horizontal::after {
    display: none !important;
    content: none !important;
  }

  html body #rt-mainbody-surround .cb_template.cbProfile .form-group.uf-form-group-one-line div.cb_field .uf-profile-fieldset dl.dl-horizontal > dt,
  html body #rt-mainbody-surround .cb_template.cbProfile .form-group.uf-form-group-one-line div.cb_field .uf-profile-fieldset dl.dl-horizontal > dd {
    display: block !important;
    float: none !important;
    width: 100% !important;
    min-width: 0;
    max-width: 100%;
    margin: 0 !important;
    padding: 3px 0 !important;
    overflow: visible !important;
    white-space: normal !important;
    text-overflow: clip !important;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  html body #rt-mainbody-surround .cb_template.cbProfile .form-group.uf-form-group-one-line div.cb_field .uf-profile-fieldset dl.dl-horizontal > dt {
    grid-column: 1 !important;
    text-align: left !important;
  }

  html body #rt-mainbody-surround .cb_template.cbProfile .form-group.uf-form-group-one-line div.cb_field .uf-profile-fieldset dl.dl-horizontal > dd {
    grid-column: 2 !important;
    text-align: left !important;
  }

  html body #rt-mainbody-surround .cb_template.cbProfile .uf-profile-fieldset a,
  html body #rt-mainbody-surround .cb_template.cbProfile .uf-profile-fieldset span {
    max-width: 100%;
    white-space: normal !important;
    overflow-wrap: anywhere;
  }

  /* qTip writes desktop coordinates inline. A fixed, inset dialog avoids the
     impossible negative-left pan while retaining vertical scrolling. */
  html body .popover.qtip-modal.uf-activity-image-tooltip {
    position: fixed !important;
    inset: 12px !important;
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    transform: none !important;
  }

  html body .popover.qtip-modal.uf-activity-image-tooltip .popover-body {
    width: 100% !important;
    max-width: 100%;
    max-height: calc(100dvh - 86px) !important;
    margin-top: 16px !important;
    overflow: auto !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  html body .popover.qtip-modal.uf-activity-image-tooltip img.uf-activity-image-inside {
    display: block;
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 auto;
  }

  /* Corporate blue replaces the legacy/annotated red mobile frame. */
  html body header#rt-top-surround div#rt-top .menu-block,
  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,
  html body header#rt-top-surround div#rt-top .gf-menu {
    border-color: #168bc4 !important;
  }

  /* Hall of fame cards are centred and their icon/text blocks no longer rely
     on negative absolute offsets inherited from desktop. */
  html.uf-design-4-podium body .block-area.api-uf-view #uf-hall-of-fame .grid-container {
    width: min(440px, 100%) !important;
    margin: 0 auto !important;
    gap: 64px !important;
  }

  .block-area.api-uf-view #uf-hall-of-fame .grid-container {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    width: min(440px, 100%) !important;
    margin: 0 auto !important;
    gap: 64px !important;
  }

  html.uf-design-4-podium body .block-area.api-uf-view #uf-hall-of-fame .dark-background {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 14px 24px !important;
    overflow: visible;
  }

  .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;
    padding: 0 14px 24px !important;
    overflow: visible;
    transform: none !important;
  }

  html.uf-design-4-podium body .block-area.api-uf-view #uf-hall-of-fame .dark-background:nth-child(2) {
    order: -1;
  }

  .block-area.api-uf-view #uf-hall-of-fame .dark-background:nth-child(2) {
    order: -1;
  }

  .block-area.api-uf-view #uf-hall-of-fame .info {
    display: grid !important;
    grid-template-columns: 50px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 10px;
    width: 100%;
    margin: 0 0 16px !important;
    padding: 0 !important;
  }

  .block-area.api-uf-view #uf-hall-of-fame .info .imagen,
  .block-area.api-uf-view #uf-hall-of-fame .info .imagen.shell {
    position: static !important;
    grid-column: 1;
    grid-row: 1 / 3;
    align-self: center;
    margin: 0 !important;
    transform: none !important;
  }

  .block-area.api-uf-view #uf-hall-of-fame .info .imagen.shell img {
    transform: none !important;
  }

  .block-area.api-uf-view #uf-hall-of-fame .info .titulo,
  .block-area.api-uf-view #uf-hall-of-fame .info .texto {
    grid-column: 2;
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .block-area.api-uf-view #uf-hall-of-fame .lista-titulos {
    width: 100%;
    margin: 0 !important;
    padding: 14px !important;
    overflow-wrap: anywhere;
  }

  .club-back-to-top {
    position: fixed;
    z-index: 10010;
    right: max(16px, env(safe-area-inset-right));
    bottom: max(18px, env(safe-area-inset-bottom));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    padding: 0;
    border: 3px solid #fedf54;
    border-radius: 50%;
    background: #063d5d;
    color: #fedf54;
    box-shadow: 0 7px 22px rgba(0, 9, 18, 0.4);
    font-size: 0;
    line-height: 1;
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity 180ms ease, transform 180ms ease, background-color 180ms ease;
  }

  .club-back-to-top svg {
    width: 26px;
    height: 26px;
    stroke: currentColor;
    stroke-width: 3;
  }

  .club-back-to-top.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .club-back-to-top:hover,
  .club-back-to-top:focus-visible {
    background: #0a5e87;
  }
}

@media (max-width: 420px) {
  .api-uf-view .opening-cards-enviroment {
    grid-template-columns: minmax(0, min(300px, 100%));
    justify-content: center !important;
    justify-items: center;
  }

  html body .block-area.api-uf-view#tableStriped .opening-cards-enviroment .cardContainer,
  html body .block-area.api-uf-view#tableStriped .opening-cards-enviroment .cardContainer:nth-child(3n),
  html body .block-area.api-uf-view#tableStriped .opening-cards-enviroment .cardContainer:nth-child(3n+1) {
    width: min(300px, 100%) !important;
    max-width: 300px !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 3 / 4;
    margin-right: auto !important;
    margin-left: auto !important;
    justify-self: center;
  }

  .div-format-collections .uf-collection {
    grid-template-columns: minmax(92px, 35%) minmax(0, 1fr);
    padding-right: 9px;
    padding-left: 9px;
  }

  .div-format-collections .uf-collection-wrapper {
    padding-left: 7px;
  }

  html body #rt-mainbody-surround .cb_template.cbProfile .uf-profile-fieldset dl.dl-horizontal {
    grid-template-columns: minmax(96px, 42%) minmax(0, 1fr);
    gap: 6px 9px;
  }
}

@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;
  }
}

/* Reserve a real row below the four absolutely positioned home headings. */
.api-uf-view.user-welcome .user-welcome-block > ul {
  box-sizing: border-box;
  padding-top: 24px !important;
}

/* Legacy CSS gave the score 999999, allowing it to cover the fixed header. */
.api-uf-view .block-team.team-result .team-name .result-goals {
  z-index: 1 !important;
}
