/*
 * Final parity layer for the original JetX auxiliary surfaces and interactions.
 * This file is intentionally last in the cascade.
 */

@keyframes reference-online-roll-up {
  to { transform: translateY(-22px); }
}

@keyframes reference-online-roll-down {
  to { transform: translateY(22px); }
}

.online-odometer .digit-strip {
  transform: translateY(0);
  will-change: transform;
}

.reference-info-empty,
.reference-history-empty {
  padding: 24px 10px;
  color: #596079;
  font: 11px/16px var(--font-family-medium);
  text-align: center;
}

.reference-chat #send-chat:disabled {
  opacity: 1;
  cursor: default;
}

/* Original JetX canvas separation and action-button type scale. */
@media screen and (min-width: 1601px) {
  #main > div.reference-canvas-frame:has(> .exact-canvas) {
    margin-bottom: 10px !important;
  }

  .bet .place-bet-div,
  .bet .cash-out-div {
    font-size: 30px !important;
  }

  .bet .place-bet-div .place-bet1,
  .bet .cash-out-div .cash-out1 {
    padding-top: 45px !important;
    font-size: 30px !important;
  }

  .bet .place-bet-div .place-bet1 .currency,
  .bet .cash-out-div .cash-out1 .currency {
    margin-left: 3px !important;
    font-size: 20px !important;
  }

  .bet .place-bet-div .place-bet2,
  .bet .cash-out-div .cash-out2 {
    font-size: 28px !important;
    line-height: 28px !important;
  }
}

@media screen and (min-width: 1301px) and (max-width: 1600px) {
  #main > div.reference-canvas-frame:has(> .exact-canvas) {
    margin-bottom: 5px !important;
  }

  .bet .place-bet-div,
  .bet .cash-out-div {
    font-size: 19px !important;
  }

  .bet .place-bet-div .place-bet1,
  .bet .cash-out-div .cash-out1 {
    padding-top: 30px !important;
    font-size: 19px !important;
  }

  .bet .place-bet-div .place-bet1 .currency,
  .bet .cash-out-div .cash-out1 .currency {
    margin-left: 3px !important;
    font-size: 13px !important;
  }

  .bet .place-bet-div .place-bet2,
  .bet .cash-out-div .cash-out2 {
    font-size: 18px !important;
    line-height: 18px !important;
  }
}

@media screen and (min-width: 851px) and (max-width: 1300px) {
  #main > div.reference-canvas-frame:has(> .exact-canvas) {
    margin-bottom: 5px !important;
  }

  .bet .place-bet-div,
  .bet .cash-out-div {
    font-size: 16px !important;
  }

  .bet .place-bet-div .place-bet1 {
    padding-top: 20px !important;
    font-size: 16px !important;
  }

  .bet .cash-out-div .cash-out1 {
    padding-top: 25px !important;
    font-size: 16px !important;
  }

  .bet .place-bet-div .place-bet1 .currency,
  .bet .cash-out-div .cash-out1 .currency {
    margin-left: 3px !important;
    font-size: 10px !important;
  }

  .bet .place-bet-div .place-bet2 {
    font-size: 15px !important;
    line-height: 15px !important;
  }

  .bet .cash-out-div .cash-out2 {
    font-size: 8px !important;
    line-height: 8px !important;
  }
}

@media screen and (max-width: 850px) {
  #main > div.reference-canvas-frame:has(> .exact-canvas) {
    margin-bottom: 5px !important;
  }

  .bet .place-bet-div .place-bet1,
  .bet .cash-out-div .cash-out1 {
    font-size: 20px !important;
    line-height: 20px !important;
  }

  .bet .place-bet-div .place-bet1 .currency,
  .bet .cash-out-div .cash-out1 .currency {
    margin-left: 3px !important;
    font-size: 12px !important;
  }

  .bet .place-bet-div .place-bet2 {
    font-size: 20px !important;
    line-height: 20px !important;
  }

  .bet .cash-out-div .cash-out2 {
    font-size: 18px !important;
    line-height: 18px !important;
  }
}

/* Original balance hierarchy: white 13px caption, yellow 15px value and the
   bundled 20px balance icon. This final layer also replaces conflicting shell
   overrides accumulated during responsive matching. */
#balance::before,
#balance > svg {
  display: none !important;
}

header #balance > .reference-balance-icon {
  position: absolute !important;
  left: 10px !important;
  top: 6px !important;
  display: block !important;
  width: 20px !important;
  height: 20px !important;
  margin: 0 !important;
}

/* The source renders the player's current stakes in a dedicated group above
   all other live bets and uses the user-yellow row color. */
#right .info .info-content.bets .row.current {
  color: var(--user-color) !important;
}

#right .info .info-content.bets .row.current.win {
  color: #65f72e !important;
}

@media screen and (min-width: 851px) {
  header .content > #balance {
    position: relative !important;
    display: block !important;
    box-sizing: border-box !important;
    width: auto !important;
    min-width: 206px !important;
    max-width: none !important;
    height: 32px !important;
    margin: 3px 15px 0 0 !important;
    padding: 0 8px 0 40px !important;
    border-radius: var(--border-radius) !important;
    overflow: visible !important;
    background-color: var(--grey-button) !important;
    color: #fff !important;
    font: 13px/32px var(--font-family-regular) !important;
    white-space: nowrap !important;
  }

  header #balance > .balance-caption {
    display: inline !important;
    margin: 0 !important;
    color: #fff !important;
    font: 13px/32px var(--font-family-regular) !important;
  }

  header #balance > .value {
    display: inline !important;
    margin-left: 5px !important;
    color: var(--main-color) !important;
    font: 15px/32px var(--font-family-medium) !important;
  }

  header #balance > .value .currency {
    margin-left: 3px !important;
    font-size: 12px !important;
  }
}

@media screen and (max-width: 850px) {
  header .content > #balance {
    position: relative !important;
    display: block !important;
    box-sizing: border-box !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 32px !important;
    margin: 0 5px 0 0 !important;
    padding: 0 0 0 32px !important;
    border-radius: 0 !important;
    overflow: visible !important;
    background: transparent !important;
    color: #fff !important;
    font: 13px/32px var(--font-family-regular) !important;
    white-space: nowrap !important;
  }

  header #balance > .balance-caption {
    display: none !important;
  }

  header .content > #balance > .value {
    display: inline !important;
    margin: 0 0 0 5px !important;
    color: var(--main-color) !important;
    font: 15px/32px var(--font-family-medium) !important;
    line-height: 32px !important;
  }

  header .content > #balance > .value .currency {
    margin-left: 3px !important;
    font-size: 11px !important;
    line-height: 32px !important;
  }
}

.reference-chat {
  z-index: 14000;
}

.reference-chat .chat-div {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 820px;
  height: 570px;
  margin: -285px 0 0 -410px;
  border-radius: var(--border-radius);
  background: #1c1e29;
  color: #d0d7e5;
  font: 18px/normal var(--font-family-medium);
  font-feature-settings: 'case' on;
  text-align: center;
}

.reference-chat .head {
  height: 60px;
  padding: 0 25px 0 55px;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
  background: #0f1017;
  color: #596079;
  font-size: 14px;
  line-height: 60px;
  text-align: left;
}

.reference-chat .chat-content {
  height: calc(100% - 60px);
  padding: 30px;
}

.reference-chat .chat-message {
  height: calc(100% - 44px);
  padding-right: 10px;
  overflow-y: auto;
}

.reference-chat .chat-input {
  height: 44px;
  padding: 5px;
  border-radius: 6px;
  background: #0b0c0f;
}

.reference-chat .chat-input-left {
  float: left;
  width: calc(100% - 100px);
  padding: 0 12px;
}

.reference-chat .chat-input-left input {
  width: 100%;
  height: 34px;
  border: 0;
  background: none;
  color: #9499b0;
  font: 12px/34px var(--font-family-medium);
}

.reference-chat .chat-input-right {
  float: right;
  width: 100px;
  height: 34px;
  border-radius: var(--border-radius);
  background: #13151d;
}

.reference-chat .chat-input-right input {
  width: 100%;
  height: 34px;
  border: 0;
  background-color: transparent;
  color: #34394c;
  font: 12px/34px var(--font-family-medium);
  text-align: center;
}

@media screen and (min-width: 851px) {
  /* The desktop capture is missing ImagesLight/win.png; use its bundled
     original mobile artwork at the reference desktop dimensions. */
  .bet .win {
    height: 79px !important;
    padding-top: 25px !important;
    background-image: url('/reference/JetXStg3/Content/ImagesLight/Mobile/win.png') !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-size: 100% 100% !important;
  }

  .bet .win.reference-win-visible {
    z-index: 3 !important;
    animation: jetx-win-rise-desktop 500ms ease forwards, jetx-win-fade 100ms linear 1500ms forwards !important;
  }
}

.reference-history-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, .8);
}

.reference-history-shell {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 820px;
  height: 570px;
  margin: -285px 0 0 -410px;
  overflow: hidden;
  border-radius: var(--border-radius);
  background: #1c1e29;
  color: #d0d7e5;
  font-family: var(--font-family-medium);
  font-feature-settings: 'case' on;
}

.reference-history-head {
  position: relative;
  height: 60px;
  padding: 0 55px;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
  background: #0f1017;
  color: #596079;
  font-size: 14px;
  line-height: 60px;
  text-align: left;
  text-transform: uppercase;
}

.reference-history-head::before {
  content: '';
  position: absolute;
  left: 22px;
  top: 20px;
  width: 20px;
  height: 20px;
  border: 2px solid #596079;
  border-radius: 50%;
  box-sizing: border-box;
}

.reference-history-head::after {
  content: '';
  position: absolute;
  left: 31px;
  top: 24px;
  width: 1px;
  height: 7px;
  background: #596079;
  box-shadow: 3px 6px 0 #596079;
  transform-origin: bottom center;
}

.reference-history-head button {
  position: absolute;
  right: 25px;
  top: 22px;
  width: 17px;
  height: 16px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.reference-history-tabs {
  display: flex;
  height: 45px;
  border-bottom: 1px solid #11131a;
  background: #171923;
}

.reference-history-tabs a {
  position: relative;
  width: 50%;
  color: #596079;
  font-size: 12px;
  line-height: 45px;
  text-align: center;
  cursor: pointer;
}

.reference-history-tabs a.active {
  color: #fddd55;
}

.reference-history-tabs a.active::after {
  content: '';
  position: absolute;
  left: 25%;
  right: 25%;
  bottom: 0;
  height: 2px;
  background: #fddd55;
}

.reference-history-table {
  height: calc(100% - 105px);
  padding: 20px 30px 30px;
}

.reference-history-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  min-height: 28px;
  margin-bottom: 1px;
  border-radius: 3px;
  background: var(--grey-button);
  color: #9499b0;
  font-size: 11px;
  line-height: 28px;
  text-align: center;
}

.reference-history-row.head {
  min-height: 30px;
  border-radius: 3px;
  background: #12141c;
  color: #596079;
  line-height: 30px;
}

.reference-history-table.rounds .reference-history-row {
  grid-template-columns: 1.7fr .8fr .8fr 1fr;
}

.reference-history-row strong {
  font-weight: normal;
}

.reference-history-row strong.win {
  color: #4ec520;
}

.reference-history-row strong.lose {
  color: #ff5151;
}

.reference-history-list {
  height: calc(100% - 31px);
  margin-top: 2px;
  overflow-y: auto;
}

@media screen and (max-width: 850px) {
  html {
    scroll-padding-top: 65px;
  }

  header {
    z-index: 10001 !important;
    isolation: isolate;
  }

  #left.header-history.expanded,
  #left.header-history.expanded .history,
  #left.header-history.expanded .history-list,
  #left.header-history .history-list.active {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
  }

  @keyframes reference-online-roll-up {
    to { transform: translateY(-12px); }
  }

  @keyframes reference-online-roll-down {
    to { transform: translateY(12px); }
  }

  /* The reference keeps both mobile betting sections visually joined. */
  #main .cash-game.simple {
    gap: 0 !important;
  }

  #main .cash-game.simple .buttons-col,
  #main .cash-game.simple #button-0,
  #main .cash-game.simple #button-1 {
    margin-bottom: 0 !important;
  }

  #main .cash-game.simple .buttons-col > .bet-div,
  #main .cash-game.simple #button-0 > .bet-div,
  #main .cash-game.simple #button-1 > .bet-div {
    border-radius: 0 !important;
  }

  /* Match desktop: render the multiplier suffix as a centered field overlay. */
  #main .cash-game.simple .buttons-col .bet-input.cash-out .input > div > span {
    display: none !important;
  }

  #main .cash-game.simple .buttons-col .bet-input.cash-out .input > div::after {
    content: 'x' !important;
    position: absolute !important;
    left: calc(50% + 16px) !important;
    top: 0 !important;
    bottom: auto !important;
    display: flex !important;
    width: 14px !important;
    height: 100% !important;
    margin: 0 !important;
    color: #fde053 !important;
    font: bold 16px/1 var(--font-family-main) !important;
    opacity: .5;
    align-items: center !important;
    justify-content: center !important;
    pointer-events: none !important;
  }

  #main .cash-game.simple .buttons-col .bet-input.cash-out .input.disabled {
    pointer-events: none !important;
    cursor: default !important;
  }

  #main .cash-game.simple .buttons-col .bet-input.cash-out .input.disabled input {
    color: #fde053 !important;
    opacity: .45 !important;
    cursor: default !important;
  }

  #main .cash-game.simple .buttons-col .bet-input.cash-out .input.disabled > div::after {
    color: #fde053 !important;
    opacity: .45 !important;
  }

  #main .cash-game.simple .buttons-col .bet-input.cash-out .input:not(.disabled) input,
  #main .cash-game.simple .buttons-col .bet-input.cash-out .input:not(.disabled) > div::after {
    color: #fde053 !important;
    opacity: 1 !important;
  }

  #right.info-div .info-content {
    display: none !important;
  }

  #right.info-div .info-content.active {
    display: block !important;
  }

  .reference-chat .chat-div {
    position: static;
    width: 100%;
    height: 100%;
    margin: 0;
    border-radius: 0;
    background: transparent;
  }

  .reference-chat {
    position: fixed;
    inset: 25px 0 0;
    width: 100%;
    height: calc(100% - 25px);
    border-radius: 2px;
    background: #161821;
    z-index: 13010;
  }

  .reference-chat .head {
    position: relative;
    height: 40px;
    padding: 0 0 0 55px;
    border-radius: 0;
    background: #0f1017;
    font: 12px/40px var(--font-family-regular);
  }

  .reference-chat .chat-content {
    height: calc(100% - 40px);
    padding: 10px;
    border-top: 1px solid #0a0c11;
  }

  .reference-chat .chat-message {
    height: calc(100% - 44px);
    padding-right: 0;
  }

  .reference-chat .chat-input {
    height: 44px;
    padding: 5px;
    border-radius: 3px;
  }

  .reference-chat .chat-input-left {
    width: calc(100% - 100px);
    height: 34px;
    padding: 0 12px;
  }

  .reference-chat .chat-input-left input {
    height: 34px;
    font-size: 12px;
    line-height: 34px;
  }

  .reference-chat .chat-input-right,
  .reference-chat .chat-input-right input {
    width: 100px;
    height: 34px;
    line-height: 34px;
  }

  .reference-chat .head .close svg {
    display: none;
  }

  .reference-history-overlay {
    top: 32px;
    bottom: 0;
    height: calc(100% - 32px);
    z-index: 13010;
    background: #161821;
  }

  .reference-history-shell {
    position: static;
    width: 100%;
    height: 100%;
    margin: 0;
    border-radius: 0;
  }

  .reference-history-head {
    height: 40px;
    padding: 0 55px;
    border-radius: 0;
    font-family: var(--font-family-regular);
    font-size: 12px;
    line-height: 40px;
    text-transform: none;
  }

  .reference-history-head::before {
    left: 20px;
    top: 10px;
  }

  .reference-history-head::after {
    left: 29px;
    top: 14px;
  }

  .reference-history-head button {
    right: 2px;
    top: 2px;
    width: 34px;
    height: 34px;
    background: url('/reference/JetXStg3/Content/ImagesLight/Icons/exit.svg') no-repeat center;
    transform: rotate(180deg);
  }

  .reference-history-head button svg {
    display: none;
  }

  .reference-history-tabs {
    height: 40px;
  }

  .reference-history-tabs a {
    font-size: 10px;
    line-height: 40px;
  }

  .reference-history-table {
    height: calc(100% - 80px);
    padding: 10px;
  }

  .reference-history-row {
    min-height: 26px;
    font-size: 10px;
    line-height: 26px;
  }

  .reference-history-row.head {
    min-height: 28px;
    line-height: 28px;
  }

  .reference-history-list {
    height: calc(100% - 30px);
  }
}

@media screen and (max-width: 850px) {
  #main .buttons,
  #main .cash-game.simple {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
  }

  #main .cash-game.simple > .panel-controls-row {
    height: 40px !important;
    min-height: 40px !important;
    flex: 0 0 40px !important;
    transform-origin: top center;
    transition: height .28s ease, min-height .28s ease, flex-basis .28s ease,
      margin .28s ease, opacity .2s ease, transform .28s ease !important;
  }

  #main .cash-game.simple > .panel-controls-row > .bet-div {
    height: 40px !important;
    min-height: 40px !important;
    padding: 5px !important;
    border-radius: 6px !important;
  }

  #main .cash-game.simple > #button-all {
    order: -4 !important;
    margin: 0 0 5px !important;
  }

  #main .cash-game.simple > #button-0 {
    order: -3 !important;
    margin-bottom: 0 !important;
    transition: margin .28s ease !important;
  }

  #main .cash-game.simple > #button-all-secondary {
    order: -2 !important;
    margin: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    overflow: hidden !important;
    flex-basis: 0 !important;
    opacity: 0 !important;
    transform: scaleY(.72) translateY(-6px);
    pointer-events: none !important;
  }

  #main .cash-game.simple > #button-1 {
    order: -1 !important;
    margin-bottom: 0 !important;
  }

  #main .cash-game.simple.auto-controls-active > #button-all {
    margin-bottom: 0 !important;
  }

  #main .cash-game.simple.auto-controls-active > #button-all-secondary {
    height: 40px !important;
    min-height: 40px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    flex-basis: 40px !important;
    opacity: 1 !important;
    transform: scaleY(1) translateY(0);
    pointer-events: auto !important;
  }

  #main .cash-game.simple.auto-controls-active > #button-0 {
    margin-bottom: 5px !important;
  }

  #main .cash-game.simple.auto-controls-active > #button-all > .bet-div,
  #main .cash-game.simple.auto-controls-active > #button-all-secondary > .bet-div {
    box-sizing: border-box !important;
    border: 1px solid var(--button-background) !important;
    border-bottom: 0 !important;
    border-radius: 6px 6px 0 0 !important;
  }

  #main .cash-game.simple.auto-controls-active > #button-0 > .bet-div,
  #main .cash-game.simple.auto-controls-active > #button-1 > .bet-div {
    border-top: 0 !important;
    border-radius: 0 0 6px 6px !important;
  }

  #main .cash-game.simple.auto-controls-active:has(> #button-0.cancel-bet) > #button-all > .bet-div,
  #main .cash-game.simple.auto-controls-active:has(> #button-1.cancel-bet) > #button-all-secondary > .bet-div {
    border-color: #8f3939 !important;
  }

  #main .cash-game.simple.auto-controls-active:has(> #button-0.cash-out) > #button-all > .bet-div,
  #main .cash-game.simple.auto-controls-active:has(> #button-1.cash-out) > #button-all-secondary > .bet-div {
    border-color: #37763d !important;
  }

  #main .cash-game.simple > #button-all > .bet-div,
  #main .cash-game.simple > #button-all-secondary > .bet-div,
  #main .cash-game.simple > #button-0 > .bet-div,
  #main .cash-game.simple > #button-1 > .bet-div {
    transition: border-radius .28s ease, border-color .2s ease !important;
  }

  @media (prefers-reduced-motion: reduce) {
    #main .cash-game.simple > .panel-controls-row,
    #main .cash-game.simple > #button-0,
    #main .cash-game.simple > #button-all > .bet-div,
    #main .cash-game.simple > #button-all-secondary > .bet-div,
    #main .cash-game.simple > #button-0 > .bet-div,
    #main .cash-game.simple > #button-1 > .bet-div {
      transition: none !important;
    }
  }
}

@media screen and (max-width: 850px) and (orientation: landscape) {
  .reference-chat {
    position: absolute;
    z-index: 13010;
  }

  .reference-chat .head {
    height: 30px;
    padding-left: 40px;
    line-height: 30px;
  }

  .reference-chat .head::before {
    left: 10px;
    top: 5px;
  }

  .reference-chat .head .close {
    top: -2px;
    width: 32px;
    height: 32px;
  }

  .reference-chat .chat-content {
    height: calc(100% - 30px);
    padding: 5px;
  }

  .reference-chat .chat-message {
    height: calc(100% - 34px);
  }

  .reference-chat .chat-outer {
    min-height: 20px;
    padding: 5px 3px;
    border-radius: 2px;
    font-size: 10px;
  }

  .reference-chat .chat-date,
  .reference-chat .chat-user {
    width: 40px;
  }

  .reference-chat .chat-text {
    width: calc(100% - 80px);
    font-size: 11px;
  }

  .reference-chat .chat-input {
    height: 34px;
    padding: 5px;
    border-radius: 2px;
  }

  .reference-chat .chat-input-left {
    width: calc(100% - 70px);
    height: 24px;
    padding: 0 5px;
  }

  .reference-chat .chat-input-left input {
    height: 24px;
    font-size: 11px;
    line-height: 24px;
  }

  .reference-chat .chat-input-right,
  .reference-chat .chat-input-right input {
    width: 70px;
    height: 24px;
    font-size: 11px;
    line-height: 24px;
  }

  .reference-history-overlay {
    position: absolute;
  }

  .reference-history-head {
    height: 30px;
    line-height: 30px;
  }

  .reference-history-head::before {
    top: 5px;
  }

  .reference-history-head::after {
    top: 9px;
  }

  .reference-history-head button {
    top: -2px;
  }

  .reference-history-tabs {
    height: 30px;
  }

  .reference-history-tabs a {
    line-height: 30px;
  }

  .reference-history-table {
    height: calc(100% - 60px);
    padding: 5px 10px 10px;
  }
}
header .right .user .reference-user-icon {
  display: block;
  position: absolute;
  left: 0;
  top: 5px;
  width: 22px;
  height: 22px;
  vertical-align: top;
}

.gift-popup .gift-new-button {
  appearance: none;
  border: 0;
  padding: 0;
  font-family: inherit;
}

/* Keep the reference gift dialog above our added plane-effects canvas. */
.jetx-form > .gift-popup {
  z-index: 14010;
}

.gift-popup.gift-resume .gift-popup-close {
  display: none;
}

#main .cash-game.none {
  display: none !important;
}

.gift .bet.place-bet,
.gift .bet.cash-out {
  cursor: pointer;
}

@media (min-width: 851px) {
  .gift-div {
    width: 100%;
    height: 100%;
  }
}

@media (max-width: 850px) and (orientation: portrait) {
  .gift .gift-row:nth-child(2) {
    height: 100%;
  }

  .gift .gift-right {
    height: 65px;
    margin-bottom: 5px;
  }

  .gift .gift-right:last-child {
    margin-bottom: 0;
  }

  .gift .gift-right .bet {
    height: 100%;
  }
}

@media (max-width: 850px) and (orientation: landscape) {
  .gift .gift-row:nth-child(2) {
    height: 100%;
  }

  .gift .gift-left {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: 17px 32px;
    column-gap: 5px;
    height: 49px;
    margin-bottom: 5px;
    padding: 0 5px;
  }

  .gift .gift-left1:not(.none) {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    float: none;
    width: 100%;
    height: 17px;
  }

  .gift .gift-left1:not(.none)::after {
    display: none;
  }

  .gift .gift-left1 .head,
  .gift .gift-left1 .value {
    float: none;
  }

  .gift .gift-left2:not(.none) {
    float: none;
    width: 100%;
    height: 32px;
    margin: 0;
  }

  .gift .gift-right {
    height: 50px;
    margin-bottom: 5px;
  }

  .gift .gift-right:last-child {
    margin-bottom: 0;
  }
}

/* The captured mobile bundle uses 17px + 40px for the landscape
   freespin summary and two 60px actions inside a 120px action area. */
@media (max-width: 850px) and (orientation: landscape) {
  #game.gift-view #main .buttons { height: 100% !important; }
  .gift .gift-left {
    display: flow-root;
    height: auto;
    margin-bottom: 10px;
    padding: 7px 5px 0;
  }
  .gift .gift-left1:not(.none) {
    display: block;
    float: none;
    width: 100%;
    height: 17px;
  }
  .gift .gift-left1 .head { float: left; }
  .gift .gift-left1 .value { float: right; }
  .gift .gift-left1:not(.none)::after { display: block; }
  .gift .gift-left2:not(.none) {
    float: left;
    width: calc(50% - 5px);
    height: 40px;
    margin-left: 5px;
  }
  .gift .gift-right { height: 60px; }
  .gift .gift-right .bet { height: 100%; }
}

/* Keep the source-sized landscape tabs on the visible canvas edge. */
@media (max-width: 850px) and (orientation: landscape) {
  #main .buttons > .tabs {
    right: 335px;
    top: calc(45% - 20px);
    z-index: 12;
  }
}

@media (max-width: 850px) {
  .gift .gift-right,
  .gift .gift-right .bet {
    display: block;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
}

@media (max-width: 850px) {
  #main .canvas.active-tabs #online-users { bottom: 34px !important; }
}
