/* Tunnel Of Laffs cautious mobile layer */
html {
  box-sizing: border-box;
  -webkit-text-size-adjust: 100%;
}

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

body {
  max-width: 100%;
  overflow-x: auto;
}

img {
  max-width: 100%;
  height: auto;
}

embed,
object,
iframe {
  max-width: 100%;
}

@media (max-width: 760px) {
  body {
    margin: 0;
    padding: 8px;
  }

  center {
    max-width: 100%;
  }

  table {
    max-width: 100% !important;
  }

  td,
  th {
    max-width: 100%;
  }

  p {
    max-width: 100%;
  }

  font[size="5"],
  font[size="6"] {
    line-height: 1.12;
  }

  img[width="608"],
  img[width="705"],
  table[width="608"],
  table[width="705"],
  table[width="717"],
  table[width="811"] {
    width: 100% !important;
  }

  table[width="80%"],
  table[width="85%"],
  table[width="94%"],
  table[width="100%"] {
    width: 100% !important;
  }

  img[align="left"],
  img[align="right"] {
    margin: 0 10px 10px;
  }
}

@media (max-width: 520px) {
  body {
    padding: 6px;
  }

  table[width="608"],
  table[width="705"],
  table[width="717"],
  table[width="811"] {
    display: block;
    overflow-x: auto;
  }

  td,
  th {
    font-size: inherit;
  }

  img[align="left"],
  img[align="right"] {
    float: none;
    display: block;
    margin: 10px auto;
  }
}

/* Asbury decorative image rows and legacy badge bars */
@media (max-width: 760px) {
  table[width="490"],
  table[width="500"] {
    width: min(100%, 92vw) !important;
  }

  table[width="490"] td,
  table[width="500"] td {
    white-space: nowrap;
  }

  table[width="490"] img[width="167"] {
    width: 34% !important;
  }

  table[width="490"] img[width="149"] {
    width: 30% !important;
  }

  table[width="500"] img[width="98"] {
    width: 19.6% !important;
  }

  img[src*="casinotitle"],
  img[src*="CasinoTitle"],
  img[src*="LogoTOLasbury"],
  img[src*="logo2rhalf"] {
    max-width: 92vw;
    height: auto;
  }
}

@media (max-width: 520px) {
  table[width="490"],
  table[width="500"] {
    display: table;
    overflow: visible;
  }

  table[width="490"] td,
  table[width="500"] td {
    display: table-cell;
  }
}

/* Main/footer navigation badge row */
@media (max-width: 760px) {
  img[src*="articlesmed"],
  img[src*="aboutusmed"],
  img[src*="creditsmed"],
  img[src*="contactusmed"],
  img[src*="linksmed"] {
    width: min(100px, 18vw) !important;
    height: auto !important;
  }
}

@media (max-width: 520px) {
  img[src*="articlesmed"],
  img[src*="aboutusmed"],
  img[src*="creditsmed"],
  img[src*="contactusmed"],
  img[src*="linksmed"] {
    width: min(88px, 17.5vw) !important;
  }
}

/* Extra-small Asbury title ornament tuning */
@media (max-width: 520px) {
  table[width="490"] {
    width: min(100%, 86vw) !important;
  }

  table[width="490"] img[width="167"] {
    width: 31% !important;
  }

  table[width="490"] img[width="149"] {
    width: 27% !important;
  }

  img[src*="casinotitle"] {
    max-width: 68vw !important;
  }
}

/* Stronger mobile sizing for Asbury title ornaments */
@media (max-width: 760px) {
  table[width="490"] {
    width: min(100%, 78vw) !important;
  }

  table[width="490"] img[width="167"] {
    width: 29% !important;
    max-width: 29% !important;
  }

  table[width="490"] img[width="149"] {
    width: 23% !important;
    max-width: 23% !important;
  }

  img[src*="casinotitle"] {
    width: min(250px, 58vw) !important;
    max-width: 58vw !important;
    height: auto !important;
  }
}

@media (max-width: 520px) {
  table[width="490"] {
    width: min(100%, 70vw) !important;
  }

  table[width="490"] img[width="167"] {
    width: 27% !important;
    max-width: 27% !important;
  }

  table[width="490"] img[width="149"] {
    width: 21% !important;
    max-width: 21% !important;
  }

  img[src*="casinotitle"] {
    width: min(210px, 52vw) !important;
    max-width: 52vw !important;
  }
}

/* Strong mobile sizing for Asbury ride-title clusters */
@media (max-width: 760px) {
  table[width="580"] {
    width: min(100%, 72vw) !important;
  }

  table[width="580"] td {
    white-space: nowrap;
  }

  img[src*="madoramalogomed"] {
    width: min(365px, 46vw) !important;
    max-width: 46vw !important;
    height: auto !important;
  }

  img[src*="casinotixpurpsm"] {
    width: min(96px, 12vw) !important;
    max-width: 12vw !important;
    height: auto !important;
  }
}

@media (max-width: 520px) {
  table[width="580"] {
    width: min(100%, 62vw) !important;
  }

  img[src*="madoramalogomed"] {
    width: min(260px, 40vw) !important;
    max-width: 40vw !important;
  }

  img[src*="casinotixpurpsm"] {
    width: min(68px, 10vw) !important;
    max-width: 10vw !important;
  }
}

/* Final Asbury-wide mobile centering and title ornament sizing */
@media (max-width: 760px) {
  table[width="490"],
  table[width="500"],
  table[width="580"] {
    margin-left: auto !important;
    margin-right: auto !important;
  }

  table[width="490"] td,
  table[width="500"] td,
  table[width="580"] td {
    text-align: center !important;
    white-space: nowrap;
  }

  table[width="490"] {
    width: min(100%, 64vw) !important;
  }

  table[width="490"] img[width="167"] {
    width: 31% !important;
    max-width: 31% !important;
  }

  table[width="490"] img[width="149"] {
    width: 28% !important;
    max-width: 28% !important;
  }

  table[width="580"] {
    width: min(100%, 64vw) !important;
  }

  img[src*="madoramalogomed"] {
    width: min(365px, 42vw) !important;
    max-width: 42vw !important;
    height: auto !important;
  }

  img[src*="casinotixpurpsm"] {
    width: min(96px, 11vw) !important;
    max-width: 11vw !important;
    height: auto !important;
  }

  img[src*="casinotitle"] {
    display: block;
    width: min(250px, 48vw) !important;
    max-width: 48vw !important;
    height: auto !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

@media (max-width: 520px) {
  table[width="490"],
  table[width="580"] {
    width: min(100%, 58vw) !important;
  }

  table[width="490"] img[width="167"] {
    width: 30% !important;
    max-width: 30% !important;
  }

  table[width="490"] img[width="149"] {
    width: 27% !important;
    max-width: 27% !important;
  }

  img[src*="madoramalogomed"] {
    width: min(260px, 37vw) !important;
    max-width: 37vw !important;
  }

  img[src*="casinotixpurpsm"] {
    width: min(68px, 9.5vw) !important;
    max-width: 9.5vw !important;
  }

  img[src*="casinotitle"] {
    width: min(210px, 44vw) !important;
    max-width: 44vw !important;
  }
}

/* Legacy transparent spacer GIFs must not scale into blank mobile blocks */
@media (max-width: 760px) {
  img[src*="trans.gif"],
  img[src*="trans.GIF"] {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    max-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }
}

/* Asbury top-of-article title blocks: remove mobile dead air after nav */
@media (max-width: 760px) {
  img[src*="menusbars3sm"] {
    display: block;
    margin: 0 auto 8px !important;
  }

  img[src*="palwhackyhauntedbmed"],
  img[src*="palrideorientmed"],
  img[src*="madoramalogomed"],
  img[src*="palace"],
  img[src*="hellnback"],
  img[src*="casinotitle"] {
    vertical-align: top;
  }

  table[width="500"]:has(img[src*="palwhackyhauntedbmed"]),
  table[width="500"]:has(img[src*="palrideorientmed"]),
  table[width="580"]:has(img[src*="madoramalogomed"]),
  table[width="490"]:has(img[src*="seacreaturetransleft"]) {
    display: table !important;
    width: auto !important;
    max-width: 72vw !important;
    margin-top: 0 !important;
    margin-bottom: 8px !important;
    overflow: visible !important;
  }

  table[width="500"]:has(img[src*="palwhackyhauntedbmed"]) td,
  table[width="500"]:has(img[src*="palrideorientmed"]) td,
  table[width="580"]:has(img[src*="madoramalogomed"]) td,
  table[width="490"]:has(img[src*="seacreaturetransleft"]) td {
    display: table-cell !important;
    height: auto !important;
    line-height: 0 !important;
    padding: 0 !important;
  }

  table[width="500"]:has(img[src*="palwhackyhauntedbmed"]) br,
  table[width="500"]:has(img[src*="palrideorientmed"]) br,
  table[width="580"]:has(img[src*="madoramalogomed"]) br,
  table[width="490"]:has(img[src*="seacreaturetransleft"]) br {
    display: none !important;
  }

  img[src*="palwhackyhauntedbmed"],
  img[src*="palrideorientmed"] {
    display: block;
    width: min(331px, 52vw) !important;
    max-width: 52vw !important;
    height: auto !important;
    margin: 0 auto !important;
  }
}

@media (max-width: 520px) {
  table[width="500"]:has(img[src*="palwhackyhauntedbmed"]),
  table[width="500"]:has(img[src*="palrideorientmed"]),
  table[width="580"]:has(img[src*="madoramalogomed"]),
  table[width="490"]:has(img[src*="seacreaturetransleft"]) {
    max-width: 58vw !important;
  }

  img[src*="palwhackyhauntedbmed"],
  img[src*="palrideorientmed"] {
    width: min(260px, 46vw) !important;
    max-width: 46vw !important;
  }
}

/* Medium-width Asbury cleanup: prevent spacer GIF dead zones before mobile breakpoint */
@media (max-width: 1200px) {
  img[src*="trans.gif"],
  img[src*="trans.GIF"] {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    max-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  img[src*="menusbars3sm"] {
    display: block;
    max-width: 92vw !important;
    height: auto !important;
    margin: 0 auto 8px !important;
  }

  table[width="500"]:has(img[src*="palwhackyhauntedbmed"]),
  table[width="500"]:has(img[src*="palrideorientmed"]),
  table[width="500"]:has(img[src*="pal-night-f"]),
  table[width="580"]:has(img[src*="madoramalogomed"]),
  table[width="490"]:has(img[src*="seacreaturetransleft"]) {
    display: table !important;
    width: auto !important;
    max-width: 78vw !important;
    margin-top: 0 !important;
    margin-bottom: 8px !important;
    overflow: visible !important;
  }

  table[width="500"]:has(img[src*="palwhackyhauntedbmed"]) td,
  table[width="500"]:has(img[src*="palrideorientmed"]) td,
  table[width="500"]:has(img[src*="pal-night-f"]) td,
  table[width="580"]:has(img[src*="madoramalogomed"]) td,
  table[width="490"]:has(img[src*="seacreaturetransleft"]) td {
    display: table-cell !important;
    height: auto !important;
    line-height: 0 !important;
    padding: 0 !important;
    text-align: center !important;
    white-space: nowrap;
  }

  table[width="500"]:has(img[src*="palwhackyhauntedbmed"]) br,
  table[width="500"]:has(img[src*="palrideorientmed"]) br,
  table[width="500"]:has(img[src*="pal-night-f"]) br,
  table[width="580"]:has(img[src*="madoramalogomed"]) br,
  table[width="490"]:has(img[src*="seacreaturetransleft"]) br {
    display: none !important;
  }

  img[src*="palwhackyhauntedbmed"],
  img[src*="palrideorientmed"] {
    display: block;
    width: min(331px, 50vw) !important;
    max-width: 50vw !important;
    height: auto !important;
    margin: 0 auto !important;
  }

  img[src*="pal-night-f"] {
    width: min(409px, 54vw) !important;
    max-width: 54vw !important;
    height: auto !important;
    margin: 0 !important;
  }

  img[src*="pal-tilliebettersm"] {
    width: min(89px, 12vw) !important;
    max-width: 12vw !important;
    height: auto !important;
    margin: 0 !important;
  }
}

/* Asbury medium-wide header safety net */
@media (max-width: 1200px) {
  img[src*="menusbars3sm"] + map + br,
  map[name="apmenu"] + br {
    display: none !important;
  }

  img[src*="pal-night-f"],
  img[src*="pal-tilliebettersm"],
  img[src*="palwhackyhauntedbmed"],
  img[src*="palrideorientmed"] {
    vertical-align: top !important;
  }

  table[width="500"]:has(img[src*="pal-night-f"]),
  table[width="500"]:has(img[src*="palwhackyhauntedbmed"]),
  table[width="500"]:has(img[src*="palrideorientmed"]) {
    display: table !important;
    width: auto !important;
    max-width: 620px !important;
    margin-top: 0 !important;
    margin-bottom: 10px !important;
    overflow: visible !important;
  }

  table[width="500"]:has(img[src*="pal-night-f"]) td,
  table[width="500"]:has(img[src*="palwhackyhauntedbmed"]) td,
  table[width="500"]:has(img[src*="palrideorientmed"]) td {
    line-height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  table[width="500"]:has(img[src*="pal-night-f"]) img[src*="trans.gif"],
  table[width="500"]:has(img[src*="palwhackyhauntedbmed"]) img[src*="trans.gif"],
  table[width="500"]:has(img[src*="palrideorientmed"]) img[src*="trans.gif"] {
    display: none !important;
  }
}
