@media (max-width: 1023px) {
  body {
    margin: 0;
  }

  div#outer_container {
    position: relative;
    top: 0;
    width: auto;
    margin: 0;
  }

  div#outer_container div.blur {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: auto;
    height: auto !important;
    min-height: 0;
  }

  div#outer_container div.container {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    width: auto;
    padding: 0 0 10px;
  }

  div.container > a:first-child {
    order: 1;
    flex: none;
  }

  div.container img.logo {
    position: static;
    display: block;
    height: 80px;
  }

  div#outer_container div.container div.top_tabs {
    order: 0;
    position: static;
    display: flex;
    flex-wrap: wrap;
    flex: 0 0 100%;
    box-sizing: border-box;
    padding: 6px 8px 0;
  }

  div.top_tabs > .tab {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    box-sizing: border-box;
    min-height: 44px;
    height: auto;
    margin: 0 2px;
    padding: 0 10px;
    white-space: nowrap;
  }

  div.top_tabs > select.tab,
  div.top_tabs > span.tab {
    order: -1;
    position: static;
    flex: 0 0 100%;
    width: 100%;
    margin: 0 0 4px;
    border-radius: 9px;
  }

  div#outer_container div.container .info_right {
    order: 2;
    position: static;
    display: flex;
    align-items: center;
    width: auto;
    height: auto;
    margin-left: auto;
    padding: 0 10px;
  }

  div.container .info_right a {
    clear: none;
    margin: 0 0 0 12px;
  }

  div#outer_container div.container div#info_bar {
    order: 3;
    position: relative;
    flex: 0 0 100%;
    width: auto;
    top: 0;
    height: 40px;
  }

  div#info_bar div#player_xp {
    left: 20px;
    top: 0;
  }

  div#outer_container div.container div#ad_chat {
    order: 4;
    position: static;
    flex: 0 0 100%;
    width: auto;
    height: auto;
    padding: 0 20px 10px;
  }

  div#ad_chat:has(> div#game_messages > span:only-child:empty) {
    display: none;
  }

  div#ad_chat div#game_messages {
    width: auto;
    height: auto;
    padding: 8px 10px;
  }

  div#outer_container div#banner_holder {
    order: 5;
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 0 0 100%;
    box-sizing: border-box;
    top: 0;
    width: auto;
    height: auto;
    min-width: 0;
    min-height: 400px;
    padding: 0 20px;
    overflow-x: clip;
  }

  div#banner_holder img#banner {
    top: 0;
    left: 20px;
    right: 20px;
    width: calc(100% - 40px);
    box-sizing: border-box;
    object-fit: cover;
  }

  div#banner_holder > div#banner_image_holder {
    order: 0;
  }

  div#banner_holder > .page_title {
    order: -1;
    position: relative;
    top: 0;
    left: 0;
    width: auto;
  }

  div#banner_holder > a.prev_page {
    left: 20px;
  }

  div#banner_holder > a.next_page {
    right: 20px;
  }

  div#banner_holder > div#banner_blur,
  div#banner_holder > div#banner_blur.with_tabs {
    order: 1;
    position: relative;
    top: 0;
    left: 0;
    width: auto;
    height: 400px;
    overflow: auto;
  }

  div#banner_holder > div#banner_blur.with_tabs {
    height: 371px;
  }

  div#banner_blur > div#banner_message,
  div#banner_blur.with_tabs > div#banner_message {
    height: auto;
    min-height: 100%;
    overflow: visible;
  }

  div#banner_message div.tabs_list {
    position: static;
    display: flex;
    overflow-x: auto;
    min-height: 40px;
    padding: 0;
  }

  div#banner_message div.tabs_list > .attached_tab {
    position: static;
    display: flex;
    align-items: center;
    flex: none;
    min-height: 40px;
    box-sizing: border-box;
  }

  div#banner_image_holder > div#popup_holder2,
  div#banner_blur div#popup_holder,
  div#banner_holder #actions_group_holder {
    left: 0;
    right: 0;
    width: auto;
  }

  div#outer_container div#inner_container {
    order: 6;
    flex: 0 0 100%;
    width: auto;
  }

  div#inner_container div.spacer {
    display: none;
  }

  div#outer_container div#bottom_bar {
    order: 7;
    position: static;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    flex: 0 0 100%;
    padding-top: 10px;
  }

  div#bottom_bar a.bottom_bar {
    float: none;
    flex: none;
    margin: 0 10px;
  }

  div#banner_message table,
  div#banner_message div.table.wide {
    display: block;
    max-width: 100%;
    overflow-x: auto;
  }

  div#horses_list > div.horse_holder {
    box-sizing: border-box;
    width: calc(50% - 16px);
  }

  div.horse_holder > div.top > div.table {
    width: auto;
  }

  div#banner_holder > div#banner_blur:has(div#stable_animation) {
    height: auto;
  }

  div#banner_blur > div#banner_message:has(> div#stable_animation) {
    display: flex;
    flex-direction: column;
  }

  div#banner_message:has(> div#stable_animation) > div.tabs_list {
    order: 0;
    flex: none;
  }

  div#banner_message > span#horse_title {
    order: 1;
    position: static;
    width: auto;
    height: auto;
    border-radius: 0;
  }

  div#banner_message > div#stable_animation {
    order: 2;
    position: relative;
  }

  div#stable_animation > img#horse_image {
    position: static;
    display: block;
    box-sizing: border-box;
    width: 100%;
    max-width: 500px;
    height: auto;
    margin: 0 auto;
    border-radius: 0;
  }

  div#banner_message > div#magic_items {
    order: 3;
    position: static;
    display: flex;
    flex-wrap: wrap;
    width: auto;
    height: auto;
  }

  div#banner_message > div#basic_buttons {
    order: 4;
    position: static;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    width: auto;
  }

  div#basic_buttons > div.button_holder {
    float: none;
    flex: none;
  }

  div#banner_message:has(> div#stable_animation) > div#separator {
    order: 5;
    position: static;
    width: auto;
    height: auto;
  }

  div#banner_message:has(> div#stable_animation) > div#separator > div.content_container {
    width: auto;
    height: auto;
  }

  div#banner_blur div#stable_tools.popup.genetics {
    left: 50%;
    margin-left: -225px;
  }

  @media (hover: none) {
    .has_tooltip {
      -webkit-touch-callout: none;
    }

    div#bottom_bar a.bottom_bar {
      position: relative;
      left: auto;
      bottom: auto;
      margin-bottom: 14px;
    }

    div#bottom_bar a.bottom_bar::after {
      content: attr(tooltip);
      position: absolute;
      top: 60px;
      left: -6px;
      right: -6px;
      overflow: hidden;
      color: #D4AF37;
      font-size: 9px;
      line-height: 12px;
      text-align: center;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
  }

  @media (max-width: 767px) {
    body {
      padding-bottom: 90px;
    }

    div#banner_holder > div#banner_blur,
    div#banner_holder > div#banner_blur.with_tabs {
      height: auto;
      min-height: 371px;
      overflow: auto;
    }

    div#outer_container div#banner_holder {
      padding: 0 8px;
    }

    div#banner_holder img#banner {
      left: 8px;
      right: 8px;
      width: calc(100% - 16px);
    }

    div#banner_holder > a.prev_page {
      left: 8px;
    }

    div#banner_holder > a.next_page {
      right: 8px;
    }

    div#outer_container div#bottom_bar {
      position: fixed;
      top: auto;
      bottom: 0;
      left: 0;
      right: 0;
      z-index: 3000;
      flex-wrap: nowrap;
      justify-content: space-around;
      padding: 4px 0;
      background-color: rgba(0, 10, 0, 0.9);
      border-top: 1px solid rgba(212, 175, 55, 0.5);
    }

    div#bottom_bar a.bottom_bar {
      margin: 0;
    }

    div#banner_image_holder > div#popup_holder2,
    div#banner_blur div#popup_holder,
    div#banner_holder #actions_group_holder {
      overflow: visible;
    }

    div#banner_message > div#separator {
      position: static;
      width: auto;
      height: auto !important;
      border-width: 0 0 1px;
      overflow-x: auto;
      overflow-y: hidden;
    }

    div#banner_message > div#separator > div.content_container {
      width: auto;
      height: auto !important;
    }

    div#banner_message > div#separator div.buttons {
      display: flex;
      margin-top: 0;
    }

    div#banner_message > div#separator div.buttons > .button_holder {
      float: none;
      flex: none;
    }

    div#banner_message > div#friends_container {
      margin-left: 0;
    }

    div#friends_container > div#friends_list {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
    }

    div#friends_list > div.friend {
      float: none;
    }

    div#banner_message div.poffice_content.office {
      position: static;
      width: auto;
      height: auto !important;
    }

    div#friends_container > #pag_title,
    div#friends_container > #pag_footer {
      position: static;
      width: auto;
    }

    div#horses_list > div.horse_holder {
      float: none;
      width: auto;
    }

    div#banner_blur div#stable_tools.popup.genetics {
      left: 4vw;
      margin-left: 0;
    }

    div#stable_tools div.gene_tool_holder {
      width: auto;
      height: auto;
      min-height: 320px;
    }

    div.gene_tool_holder h3#color {
      padding-left: 0;
      text-align: center;
    }

    div.gene_tool_holder img#image {
      display: block;
      width: auto;
      max-width: calc(100% - 140px);
      height: auto;
    }

    div#outer_container div.popup {
      position: fixed;
      top: 5vh;
      right: 4vw;
      bottom: 90px;
      left: 4vw;
      width: auto;
      height: auto;
      overflow: auto;
      z-index: 4000;
    }
  }
}

@media (max-width: 1023px) {
  body.front {
    padding-bottom: 0;
  }

  img#grass {
    position: fixed;
    top: 0;
    left: 0;
  }

  body div#outer_container {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    width: auto;
    height: auto;
    margin: 0;
    padding: 5px;
  }

  body div#outer_container div#img_holder {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    box-sizing: border-box;
    width: auto;
    height: auto;
    min-height: calc(100vh - 10px);
    margin: 0;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    border: 2px solid #D4AF37;
    border-radius: 12px;
  }

  div#img_holder > div#animation_holder {
    display: contents;
  }

  div#img_holder > img#logo {
    position: static;
    order: 1;
  }

  div#img_holder > form#login_form {
    position: static;
    order: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    box-sizing: border-box;
    width: 100%;
    max-width: 300px;
    padding: 12px;
  }

  div#img_holder > form#login_form > input {
    box-sizing: border-box;
    width: 100%;
    min-height: 40px;
    margin: 0;
    padding: 6px;
    font-size: 16px;
  }

  div#img_holder > form#login_form > button.login_button {
    position: relative;
    margin: 4px 0 0;
  }

  div#animation_holder > div#actions_group_holder {
    position: relative;
    order: 3;
    width: 100%;
    height: 30px;
  }

  div#animation_holder > div#actions_group_holder:empty {
    display: none;
  }

  body.front div#actions_group_holder > div.popup.error {
    top: 0;
    right: auto;
    bottom: auto;
    left: 0;
    width: 100%;
    overflow: visible;
  }

  div#animation_holder > div#login_animation {
    position: relative;
    order: 4;
    width: 100%;
    margin-top: auto;
  }

  div#login_animation > img.no_flash_background {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
  }

  div#login_animation > img.no_flash_horse {
    position: relative;
    top: auto;
    bottom: auto;
    left: auto;
    display: block;
    width: 100%;
    max-width: 526px;
    height: 160px;
    margin: 0 auto;
    background-position: center bottom;
    background-repeat: no-repeat;
    background-size: contain;
  }

  div#img_holder > div.links {
    position: static;
    width: auto;
    text-align: center;
  }

  div#img_holder > div#links1 {
    order: 5;
  }

  div#img_holder > div#links2 {
    order: 6;
  }
}

@media (max-width: 1023px) {
  div#outer_container div#banner_holder.credit_index,
  div#outer_container div#banner_holder.ctr_workshop,
  div#outer_container div#banner_holder.ctr_games,
  div#outer_container div#banner_holder.ctr_player {
    container-type: inline-size;
    min-height: 0;
  }

  div#banner_holder.credit_index > div#banner_image_holder,
  div#banner_holder.ctr_workshop > div#banner_image_holder,
  div#banner_holder.ctr_games > div#banner_image_holder,
  div#banner_holder.ctr_player > div#banner_image_holder {
    --scene-k: tan(atan2(100cqw, 984px));
    position: relative;
    flex: none;
    align-self: flex-start;
    width: 1024px;
    height: 420px;
    margin: 0 calc(1024px * (var(--scene-k) - 1)) calc(420px * (var(--scene-k) - 1)) calc(-20px * var(--scene-k));
    transform: scale(var(--scene-k));
    transform-origin: 0 0;
  }

  div#banner_holder.credit_index > div#banner_image_holder > div.tabs_list {
    transform: scale(tan(atan2(984px, 100cqw)));
    transform-origin: 100% 100%;
  }

  div#banner_holder.ctr_workshop > div#banner_image_holder > span.tabs_list {
    left: 20px;
    z-index: 100;
    transform: scale(tan(atan2(984px, 100cqw)));
    transform-origin: 0 100%;
  }

  div#banner_holder.credit_index > div#banner_image_holder > img#banner,
  div#banner_holder.ctr_workshop > div#banner_image_holder > img#banner,
  div#banner_holder.ctr_games > div#banner_image_holder > img#banner,
  div#banner_holder.ctr_player > div#banner_image_holder > img#banner {
    top: 20px;
    left: 20px;
    width: 984px;
    height: 400px;
  }

  div#banner_blur #banner_message div.item_info span.group {
    float: none;
    display: block;
    margin: 0 0 20px;
  }

  div#banner_blur #banner_message div.item_info a.item_link {
    display: inline-block;
    padding: 0 10px;
    vertical-align: top;
  }

  div#banner_message div.magic_item.small,
  div#banner_message div.magic_item.small.own,
  div#banner_message div.magic_item.small.not_own {
    float: none;
    width: auto;
    height: auto;
    margin: 10px 0;
  }

  div#banner_message div.magic_item.small.own div.thumb {
    height: auto;
  }

  div#banner_message div.magic_item.large span.title,
  div#banner_message div.magic_item.large img.banner,
  div#banner_message div.magic_item.large div.info,
  div#banner_message > div.message_holder > div.magic_container {
    position: static;
    width: auto;
    height: auto;
  }

  div#banner_message div.magic_item.large img.banner {
    display: block;
    max-width: 100%;
    margin: 0 auto;
  }

  div#banner_message div.magic_item.large span.description {
    margin: 10px;
  }

  div#banner_message div.magic_item.large .large_button {
    margin-top: 10px;
  }

  div#banner_message div.magic_item.large div.info {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    min-height: 40px;
  }

  div#banner_message div.magic_item.large span.price,
  div#banner_message div.magic_item.large span.duration {
    position: static;
    padding: 5px 10px;
  }

  div#outer_container div#banner_holder.game_news {
    min-height: 0;
  }

  div#banner_holder.game_news img#banner {
    display: none;
  }

  div#banner_holder.game_news > div#banner_blur.with_tabs,
  div#banner_holder.game_news > div#banner_blur.with_tabs > div#banner_message {
    height: auto;
  }

  div#banner_holder.game_news > div#banner_blur.with_tabs {
    min-height: 0;
    padding-bottom: 60px;
    overflow: visible;
  }

  div#banner_holder.game_news div#game_news {
    display: table;
    width: 100%;
  }

  div#banner_holder.game_news > a.prev_page,
  div#banner_holder.game_news > a.next_page {
    top: auto;
    bottom: 4px;
  }

  div#banner_holder.game_news > a.prev_page {
    left: 24px;
  }

  div#banner_holder.game_news > a.next_page {
    right: 24px;
  }

  @media (max-width: 767px) {
    div#banner_holder.game_news > a.prev_page {
      left: 12px;
    }

    div#banner_holder.game_news > a.next_page {
      right: 12px;
    }
  }
}

@media (max-width: 1023px) {
  div#banner_holder div.table.wide {
    display: block;
    max-width: 100%;
    overflow-x: auto;
  }

  div#banner_holder div.table.wide > div.tr > div:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background-color: rgb(12, 44, 12);
  }

  div#banner_holder div.table.wide > div.tr.fields > div:first-child,
  div#banner_holder div.table.wide > div.tr:first-child > div.th:first-child {
    background-color: rgb(20, 60, 20);
  }

  div#banner_holder div.table div.th > a,
  div#banner_holder div.table div.td > a,
  div#banner_holder div.table div.th > span > a,
  div#banner_holder div.table div.td > span > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
    box-sizing: border-box;
  }

  div#banner_holder div.table select,
  div#banner_holder div.table input[type=text],
  div#banner_holder div.table input[type=submit],
  div#banner_holder div.table input:not([type]),
  div#banner_holder div.default_centered_form select,
  div#banner_holder div.default_centered_form input[type=text],
  div#banner_holder div.magic_item select,
  div#banner_holder div#horse_list > select,
  div#banner_holder form div.form_footer input,
  div#banner_holder div.tabs_list select,
  div#banner_holder > div#pag_title > select {
    min-height: 40px;
    box-sizing: border-box;
  }

  div#banner_holder div.table input[type=checkbox],
  div#banner_holder div.table input[type=radio],
  div#banner_holder div.default_centered_form input[type=checkbox] {
    width: 24px;
    height: 24px;
  }

  div#banner_holder .attached_tab.bottom_tab > a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    min-width: 40px;
    padding: 0 8px;
    box-sizing: border-box;
  }

  div#banner_holder.ctr_job > div#banner_image_holder > .tabs_list,
  div#banner_holder.ctr_credit:not(.credit_index) > div#banner_image_holder > .tabs_list {
    position: relative;
    top: 0;
    left: 0;
    right: auto;
    display: flex;
    overflow-x: auto;
    min-height: 40px;
    padding: 0;
  }

  div#banner_holder.ctr_job > div#banner_image_holder > .tabs_list > .attached_tab,
  div#banner_holder.ctr_credit:not(.credit_index) > div#banner_image_holder > .tabs_list > .attached_tab {
    position: static;
    display: flex;
    align-items: center;
    flex: none;
    min-height: 40px;
    box-sizing: border-box;
  }

  div#banner_holder div.section._945,
  div#banner_holder div.section._600,
  div#banner_holder div.section._300 {
    float: none;
    width: auto !important;
    max-width: 100%;
  }

  div#players_list > div.player_holder {
    float: none;
    width: auto;
    max-width: 460px;
  }

  div#players_list > div.player_holder,
  div#players_list > div.player_holder > div.top {
    height: auto;
  }

  div.player_holder > div.top > div.table {
    width: auto;
    height: auto;
  }

  div#players_list a.player_title {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
  }

  div#banner_message div.magic_item.small {
    float: none;
    width: auto;
    max-width: 465px;
    height: auto;
    min-height: 220px;
  }

  div#outer_container div#banner_holder.token_collection {
    margin: 0;
  }

  div#banner_image_holder > div#tokens_list {
    position: relative;
    top: 0;
    left: 0;
    z-index: 1;
    width: auto;
    height: auto;
  }

  div#tokens_list > div.token > a {
    display: block;
  }

  div#banner_holder > div.collection_title > a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
  }

  div#banner_holder.trophy_index > div#banner_image_holder {
    position: relative;
    height: 420px;
    margin: -20px 0 0 -20px;
    overflow-x: auto;
    overflow-y: hidden;
  }

  div#banner_holder.trophy_index img#banner {
    top: 20px;
    left: 20px;
    right: auto;
    width: 984px;
  }

  div#banner_holder > div.collection_title,
  div#banner_holder > div.collection_footer {
    position: static;
    width: auto;
    height: auto;
  }

  div#banner_image_holder > div.section.list_tokens {
    position: relative;
    top: 0;
    left: 0;
    float: none;
    width: auto;
    height: auto;
    margin: 0;
  }

  div#list_tokens {
    height: auto;
  }

  div#banner_holder.token_list img#banner {
    height: calc(100% - 20px);
  }

  div#banner_holder.token_list > div#banner_image_holder > div#separator {
    position: relative;
    top: 0;
    left: 0;
    z-index: 3;
    border-radius: 0 0 12px 12px;
  }

  div#banner_holder.token_list > div#banner_image_holder > div#separator,
  div#banner_holder.token_list > div#banner_image_holder > div#separator > div.content_container {
    width: auto;
    height: auto;
  }

  div#banner_holder.token_list div#token_buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }

  div#banner_holder div.section.token_collection {
    float: none;
    width: auto;
    max-width: 455px;
  }

  div.section.token_collection > div.table {
    display: block;
    float: none;
    width: auto;
    overflow-x: auto;
  }
}

@media (max-width: 1023px) {
  div#outer_container div#banner_holder.ctr_ranch {
    min-height: 0;
  }

  div#banner_holder.ctr_ranch > div#banner_image_holder {
    position: relative;
    width: 100%;
  }

  div#banner_holder.ctr_ranch div#banner.ranch_page {
    position: relative;
    box-sizing: border-box;
    width: 100%;
    height: auto;
    margin: 0;
  }

  div#banner.ranch_page > div#ranch_holder {
    position: relative;
    box-sizing: border-box;
    width: 100% !important;
    height: 400px !important;
    touch-action: none;
  }

  div#banner.ranch_page > div#ranch_holder > div#ranch {
    left: 0 !important;
    top: 0 !important;
  }

  div#banner.ranch_page > div.navigation {
    top: 0;
    left: 0;
    width: 138px;
    height: 137px;
  }

  div#banner.ranch_page div.navigation > a.nav {
    box-sizing: content-box;
    min-width: 44px;
    min-height: 44px;
  }

  div#banner.ranch_page div.navigation > a.nav-up {
    top: 0;
    left: 44px;
  }

  div#banner.ranch_page div.navigation > a.nav-left {
    top: 44px;
    left: 0;
  }

  div#banner.ranch_page div.navigation > a.nav-right {
    top: 44px;
    left: 94px;
  }

  div#banner.ranch_page div.navigation > a.nav-down {
    top: 93px;
    left: 44px;
  }

  div#banner.ranch_page div.navigation > a.nav-zoomout {
    top: 93px;
    left: 0;
  }

  div#banner.ranch_page div.navigation > a.nav-zoomin {
    top: 93px;
    left: 94px;
  }

  div#banner_holder div#production_holder > div.table.wide {
    display: table;
    max-width: none;
    overflow-x: visible;
  }

  div#banner_holder div#production_holder > div.table.wide > div.tr > div:first-child {
    position: static;
    background-color: transparent;
  }

  div#banner_holder div#production_holder div.table div.td > a {
    display: block;
    min-width: 0;
    min-height: 0;
    box-sizing: content-box;
  }

  div#banner.ranch_page > div#build_queue {
    position: relative;
  }

  div#banner.ranch_page div#build_ranch {
    position: relative;
    display: flex;
    right: auto;
    width: 100%;
    height: 80px;
    border-width: 1px 0 0;
    border-radius: 0 0 12px 12px;
  }

  div#banner.ranch_page div#build_ranch > div {
    position: relative;
    top: auto;
    flex: 0 0 80px;
    border-bottom-width: 0;
    border-right-width: 1px;
  }

  div#banner.ranch_page div#build_ranch.folded {
    height: 20px;
  }

  div#banner.ranch_page div#build_ranch.folded > div {
    display: none;
  }

  div#banner.ranch_page a.show_build_tab {
    top: -12px;
    right: 0;
    left: auto;
    padding: 17px;
    background-origin: content-box;
    background-clip: content-box;
  }

  @media (max-width: 767px) {
    div#banner.ranch_page > div#ranch_holder {
      height: 60vh !important;
    }
  }

  @media (pointer: coarse) {
    div#banner.ranch_page div.navigation {
      display: none;
    }
  }
}

@media (max-width: 1023px) {
  div#banner_holder.ctr_games div#banner_message > div#separator {
    position: static;
    width: auto;
    height: auto;
    border-width: 0 0 1px;
    overflow-x: auto;
    overflow-y: hidden;
  }

  div#banner_holder.ctr_games div#banner_message > div#separator > div.content_container {
    width: auto;
    height: auto;
  }

  div#banner_holder.ctr_games div#separator div.buttons {
    display: flex;
    margin-top: 0;
  }

  div#banner_holder.ctr_games div#separator div.buttons > h3 {
    display: none;
  }

  div#banner_holder.ctr_games div#separator div.buttons > .button_holder {
    float: none;
    flex: none;
  }

  div#banner_holder.ctr_games div#banner_message > div.game_content {
    position: static;
    width: auto;
    height: auto;
    min-height: 300px;
    border-width: 0;
    overflow-x: auto;
  }

  div#banner_holder.ctr_games div#hangman_holder {
    position: relative;
    bottom: auto;
    width: auto;
    padding-top: 300px;
  }

  div#banner_holder.ctr_games div#hangman_holder > img#front,
  div#banner_holder.ctr_games div#hangman_holder > img.hangman,
  div#banner_holder.ctr_games div#hangman_holder > div#animation_holder {
    top: 0;
    right: auto;
    left: 50%;
    margin-left: -150px;
  }

  div#banner_holder.ctr_games div#ttt_game_area {
    max-width: 100%;
  }
}

@media (max-width: 1023px) {
  div#banner_holder.ctr_market > div#banner_blur {
    height: auto;
  }

  div#banner_message div#sell_tab,
  div#banner_message div#sell_market_tab,
  div#banner_message div#list_horses {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  div#banner_message div#sell_tab.none,
  div#banner_message div#sell_market_tab.none {
    display: none;
  }

  div#banner_message div.tab_title,
  div#banner_message div.trade_tab,
  div#banner_message div.trade_buttons,
  div#banner_message div.daily_limit,
  div#banner_message form#buy_store_horse,
  div#banner_message div#store_horse {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    width: auto;
    max-width: 100%;
    margin: 0;
    box-sizing: border-box;
  }

  div#banner_message div.trade_tab {
    height: auto;
    max-height: 280px;
  }

  div#banner_message div.trade_buttons {
    min-height: 75px;
  }

  div#banner_message form#buy_store_horse select {
    max-width: 100%;
  }

  div#banner_message div#horses_popup {
    position: static;
    max-width: 100%;
    overflow-x: auto;
  }

  div#banner_holder.ctr_town_hall a.sign,
  div#banner_holder.ctr_bank a.sign {
    top: auto;
    bottom: 16px;
    box-sizing: border-box;
    width: calc(88% / var(--signs) - 8px);
    height: auto;
    min-height: 40px;
    padding: 6px 4px;
    font-size: 13px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 7px;
  }

  div#banner_holder.ctr_town_hall {
    --signs: 4;
  }

  div#banner_holder.ctr_bank {
    --signs: 3;
  }

  div#banner_holder.ctr_town_hall a.sign#jobs,
  div#banner_holder.ctr_bank a.sign#transfer {
    left: 6%;
  }

  div#banner_holder.ctr_town_hall a.sign#tops,
  div#banner_holder.ctr_bank a.sign#withdraw {
    left: calc(6% + 88% / var(--signs));
  }

  div#banner_holder.ctr_town_hall a.sign#partners,
  div#banner_holder.ctr_bank a.sign#deposit {
    left: calc(6% + 88% / var(--signs) * 2);
  }

  div#banner_holder.ctr_town_hall a.sign#bank {
    left: calc(6% + 88% / var(--signs) * 3);
  }

  div#banner_holder.ctr_clinic img#geld {
    display: none;
  }

  div#banner_holder.ctr_clinic div#separator {
    top: 21px;
    right: 20px;
    left: auto;
    width: min(410px, calc(100% - 40px));
    max-height: 400px;
  }

  div#banner_holder.ctr_clinic div#separator > div.content_container {
    width: auto;
    max-height: 400px;
    overflow: auto;
  }

  div#banner_holder.ctr_barn div#work_room {
    right: 20px;
    left: auto;
    width: min(453px, calc(100% - 40px));
  }

  div#banner_holder.ctr_barn > div#paginator_holder {
    right: 20px;
    left: 20px;
    width: auto;
  }

  div#banner_holder.ctr_barn > div#paginator_holder > div#pag_title {
    right: 0;
    left: auto;
    box-sizing: border-box;
    width: min(453px, 100%);
  }

  div#outer_container div#banner_message > div.popup.info_popup {
    position: static;
    width: auto;
    height: auto;
  }

  div.info_popup > div.info_side,
  div.info_popup > span#player_description,
  div.info_popup > div#separator,
  div.info_popup > div#separator > div.content_container {
    position: static;
    width: auto;
    height: auto;
  }

  ul#menu_wish {
    height: auto;
  }

  div#banner_holder.ctr_wish > div#banner_blur,
  div#banner_holder.ctr_wish > div#banner_blur > div#banner_message {
    height: auto;
    min-height: 371px;
  }

  div#banner_holder.ctr_workshop div.banner_side select#tack_type {
    min-height: 40px;
    transform: scale(tan(atan2(984px, 100cqw)));
    transform-origin: 100% 0;
  }

  div#banner_holder.ctr_workshop div#production_holder {
    right: 20px;
    left: auto;
    transform: scale(tan(atan2(984px, 100cqw)));
    transform-origin: 100% 100%;
    max-width: calc(100cqw - 16px);
    overflow-x: auto;
  }

  div#banner_holder.ctr_workshop div#production_holder div.table div.td {
    padding: 0 2px;
  }

  div#banner_holder.ctr_workshop div#production_holder div.table div.td > a.tiny {
    min-width: 24px;
    min-height: 24px;
    line-height: 24px;
  }

  div#banner_holder.ctr_workshop span.tabs_list > a.attached_tab {
    display: inline-block;
    min-height: 24px;
    line-height: 24px;
  }

  div#banner_message input[type="text"],
  div#banner_message input[type="password"],
  div#banner_message input[type="number"],
  div#banner_message select,
  div#banner_message textarea,
  div#banner_message button,
  div#banner_message a.menu,
  div#banner_message a.small_button {
    box-sizing: border-box;
    min-height: 40px;
  }

  div#banner_message a.menu {
    display: inline-flex;
    align-items: center;
  }

  div#banner_message textarea#question_question {
    width: 100%;
  }

  div#banner_holder.ctr_clinic div#vet_stats,
  div#banner_holder.ctr_stable_hand div#stable_stats,
  div#banner_holder.ctr_stable_hand div#schedule_horse {
    max-width: calc(100% - 40px);
    overflow-x: auto;
  }

  body.front div#img_holder > div#links2 a#faq {
    display: inline;
  }

  @media (max-width: 767px) {
    div#banner_holder.ctr_clinic div#separator,
    div#banner_holder.ctr_barn div#work_room,
    div#banner_holder.ctr_barn > div#paginator_holder {
      right: 8px;
    }

    div#banner_holder.ctr_clinic div#separator,
    div#banner_holder.ctr_barn div#work_room {
      width: calc(100% - 16px);
    }

    div#banner_holder.ctr_barn > div#paginator_holder {
      left: 8px;
    }
  }
}

@media (max-width: 1023px) {
  div#banner_holder.game_settings form.full_form,
  div#banner_holder.game_settings form.full_form div.table,
  div#banner_holder.game_settings form.full_form div.form_footer {
    position: static;
    height: auto;
  }

  div#banner_holder.game_settings div.button_holder a.menu {
    display: block;
    width: 100%;
  }

  div#banner_holder.game_settings div#settings_popup {
    bottom: auto;
  }
}
