@media (max-width: 1020px) {
  .menu-toggle {
    display: block;
  }

  .site-nav {
    position: fixed;
    top: var(--header-height);
    left: 1rem;
    right: 1rem;
    display: none;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(70, 81, 90, 0.94);
    box-shadow: var(--shadow);
    backdrop-filter: blur(22px) saturate(135%);
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav > ul {
    display: grid;
    align-items: stretch;
  }

  .has-dropdown {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .dropdown {
    position: static;
    grid-column: 1 / -1;
    width: 100%;
    margin-top: 0.25rem;
    box-shadow: none;
  }

  .content-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-trust {
    grid-template-columns: 1fr;
  }

  .trust-strip--payments div,
  .trust-strip--responsible div {
    grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  }

  .sidebar {
    position: static;
    order: -1;
  }

  .casino-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  :root {
    --header-height: 66px;
  }

  .container,
  .narrow-container {
    width: min(100% - 1rem, var(--container));
  }

  .page-shell {
    padding-top: 0.75rem;
  }

  .casino-card {
    grid-template-columns: 44px minmax(0, 1fr);
    grid-template-areas:
      "rank logo"
      "main main"
      "actions actions";
    min-height: auto;
    padding: 1rem;
    gap: 0.8rem;
    overflow: hidden;
  }

  .casino-rank {
    position: static;
    grid-area: rank;
    align-self: center;
    justify-self: start;
  }

  .casino-logo {
    grid-area: logo;
    width: 100%;
    max-width: 220px;
    height: 82px;
    justify-self: center;
    padding: 0.5rem;
  }

  .casino-logo img {
    display: block;
    width: 100% !important;
    max-width: 100%;
    height: 100% !important;
    max-height: 64px;
    object-fit: contain;
    object-position: center center;
  }

  .casino-main {
    text-align: left;
  }

  .casino-main h3 {
    font-size: 1.08rem;
  }

  .casino-main p,
  .casino-main span {
    font-size: 0.95rem;
    line-height: 1.45;
  }

  .casino-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    padding-top: 0.7rem;
  }

  .btn,
  .brand-cta {
    width: 100%;
  }

  .listing-head,
  .promo-popup {
    display: grid;
  }

  .promo-popup {
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
  }

  .toc,
  .author-box {
    padding: 0.95rem;
  }

  .toc h2,
  .author-box h2 {
    font-size: 1.05rem;
  }

  .toc ol {
    gap: 0.5rem;
    padding-left: 1.15rem;
  }

  .toc a,
  .author-box p,
  .author-box a {
    font-size: 0.98rem;
    line-height: 1.45;
  }

  .toc-level-3 {
    margin-left: 0;
    font-size: 0.92rem;
  }

  .author-box {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .author-avatar {
    width: 48px;
    height: 48px;
  }

  .link-grid {
    grid-template-columns: 1fr;
  }
}

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

/* Viewport overflow fix 20260625-v2: do not change desktop popup/menu behavior */
html,
body {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
}

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

.site-header,
.site-footer,
main,
.page-shell,
.content-grid,
.sidebar,
.glass-panel,
.intro-panel,
.article-body,
.review-content,
.service-content,
.casino-listing,
.casino-grid,
.casino-card,
.casino-main,
.casino-actions,
.toc,
.author-box,
.footer-grid,
.footer-trust,
.trust-strip,
.link-grid,
.faq-accordion,
.faq-list,
.faq-item,
.callout,
.table-scroll {
  max-width: 100%;
  min-width: 0;
}

.content-grid > *,
.footer-grid > *,
.footer-trust > *,
.casino-grid > *,
.link-grid > * {
  min-width: 0;
}

h1,
h2,
h3,
p,
li,
span,
strong,
summary,
th,
td,
.article-body a,
.review-content a,
.service-content a,
.toc a,
.author-box a,
.review-link {
  overflow-wrap: break-word;
  word-break: normal;
}

.article-body,
.review-content,
.service-content,
.intro-panel,
.toc,
.author-box,
.faq-answer,
.casino-main {
  overflow-wrap: anywhere;
}

.btn,
.brand-cta {
  max-width: 100%;
  min-width: 0;
  text-align: center;
  white-space: normal;
}

.casino-logo {
  max-width: 100%;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-scroll table {
  max-width: none;
}

@media (max-width: 1020px) {
  .header-inner {
    min-width: 0;
  }

  .brand {
    min-width: 0;
  }

  .brand img {
    width: min(168px, 100%);
    height: auto;
    max-height: 44px;
  }

  .site-nav,
  .dropdown {
    min-width: 0;
    max-width: calc(100vw - 2rem);
    overflow-x: hidden;
  }

  .site-nav a,
  .dropdown a {
    white-space: normal;
  }
}

@media (max-width: 620px) {
  .container,
  .narrow-container {
    width: 100%;
    max-width: 100%;
    padding-inline: 0.5rem;
  }

  .header-inner {
    gap: 0.75rem;
  }

  .brand {
    flex: 1 1 auto;
  }

  .menu-toggle {
    flex: 0 0 44px;
  }

  .site-nav {
    left: 0.5rem;
    right: 0.5rem;
    max-width: calc(100vw - 1rem);
    max-height: calc(100dvh - var(--header-height) - 1rem);
    overflow-y: auto;
  }

  .dropdown {
    max-width: 100%;
  }

  .intro-panel,
  .service-content,
  .review-content,
  .article-body,
  .toc,
  .author-box,
  .casino-card,
  .trust-strip {
    padding: 0.9rem;
  }

  .casino-card,
  .casino-actions {
    width: 100%;
  }

  .promo-popup {
    top: 50%;
    bottom: auto;
    left: 50%;
    right: auto;
    width: min(360px, calc(100vw - 1rem));
    max-width: calc(100vw - 1rem);
    max-height: calc(100dvh - 1rem);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-items: stretch;
    gap: 0.85rem;
    padding: 0.9rem;
    margin-inline: 0;
    transform: translate(-50%, -50%);
    overflow-y: auto;
    overflow-x: hidden;
  }

  .promo-popup > * {
    min-width: 0;
    max-width: 100%;
  }

  .promo-popup > img {
    justify-self: center;
    width: min(240px, 100%);
    height: auto;
    max-height: 80px;
    object-fit: contain;
  }

  .promo-popup .btn {
    width: 100%;
  }

  .promo-close {
    top: 0.45rem;
    right: 0.45rem;
  }
}
