/* Bootstrap switches the site to its compact navigation below lg. */
@media (max-width: 991.98px) {
  .header {
    position: relative;
    background-color: #0d1729;
  }
  .header-wrapper {
    align-items: center;
    gap: 10px;
    padding: 6px 0;
  }
  .header-logo {
    position: static;
    min-width: 0;
    margin-right: auto;
  }
  .header-logo a,
  .mobile-presentation {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
  .header-logo a img {
    width: clamp(90px, 28vw, 155px);
    max-width: 100%;
    height: auto;
  }
  .mobile-presentation {
    justify-content: center;
    padding: 6px 12px;
    border: 1px solid #b39862;
    border-radius: 4px;
    background: #162338;
    color: #ffe2a7;
    font-size: .875rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    overflow-wrap: anywhere;
  }
  .mobile-bar .bar,
  .offcanvas-cls {
    width: 44px;
    height: 44px;
    border: 0;
    padding: 0;
    background: transparent;
    text-align: center;
  }
  .offcanvas-wrapper {
    inset: 0;
    transition-property: opacity, transform;
    height: 100%;
    height: 100dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: max(10px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
             max(64px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    background: #0c172af7;
  }
  .offcanvas-cls {
    display: block;
    margin-left: auto;
  }
  .offcanvas-wrapper :is(a, button) {
    transition-property: color, background-color, border-color;
  }
  .offcanvas-menu {
    width: min(100%, 38rem);
    margin: 0 auto;
  }
  .offcanvas-menu ul li a {
    min-height: 44px;
    padding: 9px 8px;
    border-color: #405677;
    overflow-wrap: anywhere;
  }
  .offcanvas-menu .dropdown-menu.show {
    position: static !important;
    transform: none !important;
    width: 100%;
    margin: 0;
    background: #dee7f4;
    box-shadow: none;
  }
  #mini-icons, .hero-area .fake-logo { display: none; }
  .section.hero-area {
    display: block;
    min-height: 0;
    padding: 0;
    background-position: center top;
    background-color: #0b1525;
  }
  .hero-area video.header-video {
    position: static;
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 12 / 5;
    transform: none;
    object-fit: cover;
    object-position: center;
  }
  .hero-area > .container {
    position: relative;
    max-width: none;
    padding: 0;
    background: #0c1729;
    border-block: 1px solid #25364e;
  }
  .hero-content {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 0;
    max-width: 40rem;
    margin: 0 auto;
    padding: 6px 0;
  }
  .heroItem {
    display: flex;
    flex-flow: row wrap;
    align-content: flex-start;
    justify-content: center;
    align-items: center;
    gap: 2px 4px;
    min-width: 0;
    padding: 0 5px;
  }
  .heroItem + .heroItem { border-inline-start: 1px solid #2a3950; }
  .heroItem-img { flex: 0 0 18px; width: 18px; }
  .heroItem-img img { display: block; width: 100%; height: auto; }
  .heroItem-text { display: contents; }
  .heroItem-text h6 {
    order: 1;
    flex: 0 0 100%;
    margin: 0;
    font: 500 .75rem/1.2 var(--opensans);
    text-align: center;
    text-wrap: balance;
    overflow-wrap: anywhere;
    color: #c4d0e2;
  }
  .heroItem-text p {
    flex: 0 0 auto;
    white-space: nowrap;
    font: 700 .875rem/1.2 var(--opensans);
    font-variant-numeric: tabular-nums;
    color: #f5f7fc;
  }
  /* The heading already specifies the 24-hour period in every site language. */
  .heroItem-text .stat-info { display: none; }

  .hero-bottom-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    height: auto;
    margin: 0 0 12px;
  }
  .hero-bottom-row > div { width: auto; min-width: 0; margin: 0; }
  .bottomItem {
    height: auto;
    min-height: 70px;
    gap: 6px;
    padding: 8px 5px;
    background-size: cover;
  }
  .bottomItem-img img { width: 44px; height: auto; margin: 0; }
  .bottomItem-content { width: auto; min-width: 0; flex: 0 1 auto; padding: 0; }
  .bottomItem-content--title,
  .bottomItem-content--text { overflow-wrap: anywhere; line-height: 1.25; }
  .bottomItem-content--title { font-size: .8125rem; }
  .bottomItem-content--text { display: block; font-size: .75rem; }

  .account-panel > div, .content-infos > div, .news-wrapp { min-width: 0; }
  .news-wrapp { width: 100%; }
  .news-wrapp > .news-header { padding: 12px 0; margin-bottom: 12px; }
  .news-wrapp > .news-header h4 { padding: 0; margin: 0; }
  .news-wrapp > .news-header .news-tabs:not(:has(*)) { min-height: 0 !important; }
  .newsItem, .widget-body, .footer-copy { overflow-wrap: anywhere; }
  .newsItem img, .newsItem video { max-width: 100%; height: auto; }
  .newsItem pre { max-width: 100%; overflow-x: auto; }
  .newsItem .jumbotron { padding: 8px 0 !important; }
  .newsItem .jumbotron form .row { row-gap: 8px; }
  .newsItem .form-control, .widget-login .form-input input {
    min-height: 44px;
    font-size: 16px;
  }
  .widget.widget-login .widget-body { padding: 12px; }
  .form-btns { flex-wrap: wrap; gap: 6px 12px; }
  .form-btns a { display: inline-flex; align-items: center; min-height: 44px; }
  .content-area .btn, .content-area .btn-main,
  .content-area .rank-button, .user-menu a {
    min-height: 44px;
    height: auto;
    padding-block: 10px;
    line-height: 1.5;
    max-width: 100%;
    white-space: normal;
    vertical-align: middle;
  }
  .newsItem .download-button { max-width: 100%; }
  .newsItem .pagination, .newsItem .pagination ul { padding: 4px 0; flex-wrap: wrap; }
  .newsItem .pagination li { margin: 2px; }
  .newsItem .pagination a { min-width: 36px; width: auto; min-height: 44px; padding: 4px; }
  .video-area {
    height: auto !important;
    aspect-ratio: 16 / 9;
    background-position: center;
  }
  #itemShop .modal-dialog { margin: .5rem auto; width: calc(100% - 1rem); }
  #itemShop .modal-body { padding: .5rem; }
  #itemShop #fancybox-frame {
    display: block;
    width: 100% !important;
    height: min(655px, calc(100vh - 6rem)) !important;
    height: min(655px, calc(100dvh - 6rem)) !important;
  }
  #il-cookie-banner {
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px);
    overflow-y: auto;
  }
  .footer { padding-bottom: max(54px, env(safe-area-inset-bottom)); }
  .footer-copy a[href] { display: inline-block; padding: 6px 2px; }
  :is(.offcanvas-wrapper, .header, .content-area, .footer) :focus-visible {
    outline: 2px solid #ffd790;
    outline-offset: 2px;
  }
}

@media (max-width: 575.98px) {
  .hero-content { grid-template-columns: minmax(0, 1fr) minmax(0, 1.24fr) minmax(0, 1fr); }
  .bottomItem { flex-direction: column; justify-content: flex-start; gap: 2px; text-align: center; }
  .bottomItem-img img { width: 32px; height: 31px; object-fit: contain; }
  .bottomItem-content--title { font-size: .75rem; }
  .bottomItem-content--text { font-size: .71875rem; }
  .newsItem .table tr > *, .widget-table .table tr > * { padding: 8px 5px; }
  /* Only the two-column forms (login, registration, recovery, account settings)
     stack their cells. Ranking tables keep their column headings. */
  .newsItem form > table.table:not(:has(thead)) > tbody > tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }
  .newsItem form > table.table:not(:has(thead)),
  .newsItem form > table.table:not(:has(thead)) > tbody {
    display: block;
    width: 100%;
  }
  .newsItem form > table.table:not(:has(thead)) > tbody > tr > td {
    text-align: start;
    padding: 5px 8px 9px;
    font-size: .875rem;
  }
  .newsItem form > table.table:not(:has(thead)) > tbody > tr > td:first-child {
    padding: 9px 8px 0;
    font-weight: 600;
  }
  .newsItem .text-danger:empty { margin: 0; }
  .newsItem .table:has(> thead th:nth-child(5)) {
    display: block;
    overflow-x: auto;
    overflow-wrap: normal;
  }
  .g-recaptcha {
    transform: none !important;
    height: auto !important;
  }
  .footer-copy { text-align: center; }
}

/* A standard reCAPTCHA is 304 px wide before the panel's gutters. */
@media (max-width: 374.98px) {
  .g-recaptcha:not([data-size="compact"]) { zoom: .82; }
}
@media (max-width: 991.98px) and (max-height: 500px) {
  .hero-area video.header-video {
    max-height: 68vh;
    max-height: 68svh;
    object-fit: contain;
    background: #091326;
  }
}
@media (max-width: 991.98px) and (prefers-reduced-motion: reduce) {
  .offcanvas-wrapper { transition: none; }
}

/* The policy document contains legacy two-column tables with width attributes. */
@media (max-width: 1199.98px) {
  .newsItem table[width][cellpadding] {
    width: 100%;
    max-width: 100%;
    table-layout: fixed;
    overflow-wrap: anywhere;
  }
  .newsItem table[width][cellpadding] :is(col, td)[width] { width: auto; }
  .newsItem :is(p, li)[align][style*="line-height: 0."] { line-height: 1.45 !important; }
}

@media (max-width: 991.98px) {
  body { background-image: url("../imgs/main-mobile.webp"); }
  .section.hero-area { background-image: url("../imgs/hero-mobile.webp") !important; }
  body.mobile-nav-open { overflow: hidden; }
}

@media (min-width: 992px) {
  .heroItem { gap: 8px; }
  .heroItem-img { width: 36px; }
  .heroItem-img img { display: block; width: 100%; height: auto; }
  .heroItem-text { text-shadow: 0 1px 3px #091225; }
}

/* In the first desktop grid size, the two ranking panels get one quarter
   of a 960px container each. Long names may still need a local scroll. */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .content-infos .widget-table .widget-body { overflow-x: auto; }
  .content-infos .widget-table .table :is(td, th) { padding-inline: 4px; }
  .content-infos .widget-table .table a { overflow-wrap: anywhere; }
}
