/* The lobby rotates #hv-ui-root on portrait phones. Size every overlay against
   that landscape surface, not against the unrotated vw/dvh media viewport. */
html.hv-virtual-landscape #hv-event-quickbar {
  top: 29px;
  left: auto;
  right: 4px;
  width: min(42%, 470px);
  height: 54px;
  padding: 0;
}
html.hv-virtual-landscape #hv-event-quickbar button img {
  top: -2px;
  width: 44px;
  height: 42px;
}
html.hv-virtual-landscape #hv-event-quickbar button[data-event-quick="referral"] img { width: 49px; }
html.hv-virtual-landscape #hv-event-quickbar button span { bottom: 2px; font-size: 9px; }
html.hv-virtual-landscape #hv-event-quickbar button small { font-size: 7px; }

/* Keep the lobby's announcements and five promotions in one narrow header
   lane. Both remain visible without extending over the first game row. */
@media (hover: none) and (pointer: coarse),
       (max-width: 600px) and (orientation: portrait) {
  #hv-top-notices,
  html.hv-virtual-landscape #hv-top-notices {
    top: 4px;
    left: 3px;
    right: auto;
    width: 40%;
    height: 36px;
    grid-template-columns: minmax(0, 1fr);
    font-size: 10px;
  }
  #hv-top-notices .hv-top-notice-left,
  html.hv-virtual-landscape #hv-top-notices .hv-top-notice-left {
    margin-left: 66px;
    padding: 0 8px;
    clip-path: none;
  }
  #hv-top-notices .hv-notice-logo-gap,
  #hv-top-notices .hv-top-notice-right { display: none; }
  #hv-event-quickbar,
  html.hv-virtual-landscape #hv-event-quickbar {
    top: 4px;
    right: 3px;
    left: auto;
    width: 39%;
    height: 42px;
    padding: 0;
  }
  #hv-event-quickbar button img,
  html.hv-virtual-landscape #hv-event-quickbar button img {
    top: -1px;
    width: 35px;
    height: 34px;
  }
  #hv-event-quickbar button[data-event-quick="referral"] img,
  html.hv-virtual-landscape #hv-event-quickbar button[data-event-quick="referral"] img { width: 38px; }
  #hv-event-quickbar button span,
  html.hv-virtual-landscape #hv-event-quickbar button span { bottom: 1px; font-size: 8px; }
  #hv-event-quickbar button small,
  html.hv-virtual-landscape #hv-event-quickbar button small { font-size: 6px; }
  #hv-wallet-actions,
  html.hv-virtual-landscape #hv-wallet-actions { width: 176px; height: 62px; }
  #hv-wallet-actions::before { inset: 5px 0 0; }
  .hv-wallet-btn,
  html.hv-virtual-landscape .hv-wallet-btn { width: 55px; height: 59px; bottom: 1px; }
  .hv-wallet-asset,
  html.hv-virtual-landscape .hv-wallet-asset { height: 53px; }
  .hv-wallet-btn-label,
  html.hv-virtual-landscape .hv-wallet-btn-label { min-width: 39px; font-size: 11px; padding: 1px 3px; }
}

html.hv-virtual-landscape #hv-wallet-overlay .hv-modal,
html.hv-virtual-landscape #hv-wallet-overlay.is-withdraw .hv-modal,
html.hv-virtual-landscape #hv-wallet-overlay:not(.is-withdraw) .hv-modal,
html.hv-virtual-landscape #hv-wallet-overlay[data-pane="crypto"] .hv-modal,
html.hv-virtual-landscape #hv-wallet-overlay[data-pane="bank-result"] .hv-modal {
  width: min(96%, 1000px);
  height: min(94%, 555px);
  max-height: 94%;
  aspect-ratio: auto;
  overflow: hidden;
}
html.hv-virtual-landscape #hv-wallet-overlay .hv-wallet-popup-header {
  flex: 0 0 48px;
  padding: 0 84px 0 4%;
}
html.hv-virtual-landscape #hv-wallet-overlay .hv-modal-title { font-size: 20px; }
html.hv-virtual-landscape #hv-wallet-overlay .hv-close { width: 82px; }
html.hv-virtual-landscape #hv-wallet-overlay .hv-modal-head,
html.hv-virtual-landscape #hv-wallet-overlay.is-withdraw .hv-modal-head {
  display: flex;
  flex: 0 0 38px;
  height: 38px;
  margin: 0 4%;
}
html.hv-virtual-landscape #hv-wallet-overlay .hv-tabs { flex-wrap: nowrap; gap: 5px; }
html.hv-virtual-landscape #hv-wallet-overlay .hv-tab {
  flex: 1 1 0;
  min-height: 29px;
  padding: 2px 4px;
  font-size: 11px;
}
html.hv-virtual-landscape #hv-wallet-overlay .hv-content,
html.hv-virtual-landscape #hv-wallet-overlay.is-withdraw .hv-content {
  min-height: 0;
  margin: 3px 4% 3%;
  padding: 8px 14px;
  overflow: auto;
}
html.hv-virtual-landscape #hv-wallet-overlay .hv-bank-start,
html.hv-virtual-landscape #hv-wallet-overlay .hv-withdraw-form,
html.hv-virtual-landscape #hv-wallet-overlay .hv-transfer-form { width: min(100%, 650px); }
html.hv-virtual-landscape #hv-wallet-overlay .hv-bank-prompt { margin-bottom: 8px; font-size: 13px; }
html.hv-virtual-landscape #hv-wallet-overlay .hv-bank-start .hv-form-row,
html.hv-virtual-landscape #hv-wallet-overlay .hv-withdraw-form .hv-form-row {
  grid-template-columns: 130px minmax(0, 1fr);
  min-height: 36px;
  margin: 6px 0;
}
html.hv-virtual-landscape #hv-wallet-overlay .hv-bank-start .hv-label,
html.hv-virtual-landscape #hv-wallet-overlay .hv-withdraw-form .hv-label { font-size: 14px; }
html.hv-virtual-landscape #hv-wallet-overlay .hv-bank-start .hv-input,
html.hv-virtual-landscape #hv-wallet-overlay .hv-withdraw-form .hv-input {
  min-height: 36px;
  font-size: 14px;
}
html.hv-virtual-landscape #hv-wallet-overlay .hv-bank-start .hv-submit,
html.hv-virtual-landscape #hv-wallet-overlay .hv-withdraw-form .hv-submit {
  min-height: 39px;
  min-width: 180px;
  margin-top: 9px;
  font-size: 16px;
}
html.hv-virtual-landscape #hv-wallet-overlay .hv-transfer-input { min-height: 37px; }
html.hv-virtual-landscape #hv-wallet-overlay .hv-transfer-submit { min-height: 38px; font-size: 18px; }
html.hv-virtual-landscape #hv-wallet-overlay .hv-qr,
html.hv-virtual-landscape #hv-wallet-overlay .hv-qr-empty { width: 90px; height: 90px; }

html.hv-virtual-landscape #hv-contact-overlay .hv-contact-popup {
  width: min(92%, 900px);
  height: min(86%, 450px);
  padding: 64px 28px 23px;
}
html.hv-virtual-landscape #hv-contact-overlay .hv-contact-links {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 8px 12px;
}
html.hv-virtual-landscape #hv-contact-overlay .hv-contact-label { font-size: 16px; }
html.hv-virtual-landscape #hv-contact-overlay .hv-contact-icon { flex-basis: 48px; }
html.hv-virtual-landscape #hv-contact-overlay .hv-contact-icon svg { width: 31px; height: 31px; }

html.hv-virtual-landscape #hv-event-overlay .hv-event-popup {
  width: min(97%, 1120px);
  height: min(96%, 560px);
  padding: 53px 16px 12px;
}
html.hv-virtual-landscape #hv-event-overlay .hv-event-header { height: 49px; }
html.hv-virtual-landscape #hv-event-overlay .hv-event-header h2 { font-size: 23px; }
html.hv-virtual-landscape #hv-event-overlay .hv-event-close { top: 5px; width: 48px; height: 40px; }
html.hv-virtual-landscape #hv-event-overlay .hv-event-layout {
  display: grid;
  grid-template-columns: minmax(155px, 21%) minmax(0, 1fr);
  gap: 8px;
}
html.hv-virtual-landscape #hv-event-overlay .hv-event-nav {
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  gap: 5px;
  padding: 2px;
}
html.hv-virtual-landscape #hv-event-overlay .hv-event-nav button {
  width: 100%;
  min-height: 47px;
  flex: 0 0 47px;
  font-size: 12px;
}
html.hv-virtual-landscape #hv-event-overlay .hv-event-nav img { width: 39px; height: 39px; flex-basis: 39px; }
html.hv-virtual-landscape #hv-event-overlay .hv-event-tabs { flex: 0 0 38px; justify-content: center; }
html.hv-virtual-landscape #hv-event-overlay .hv-event-content { min-height: 0; padding: 8px 10px; }

@media (max-height: 500px) and (orientation: landscape) {
  #hv-event-quickbar { top: 22px; right: 3px; width: min(41vw, 430px); height: 52px; }
  #hv-event-quickbar button img { width: 43px; height: 42px; }
  #hv-event-quickbar button span { bottom: 2px; font-size: 9px; }
  #hv-event-quickbar button small { font-size: 7px; }
}
@media (hover: none) and (pointer: coarse) and (orientation: landscape) {
  #hv-event-quickbar { top: 4px; right: 3px; width: 39%; height: 42px; }
  #hv-event-quickbar button img { top: -1px; width: 35px; height: 34px; }
  #hv-event-quickbar button[data-event-quick="referral"] img { width: 38px; }
  #hv-event-quickbar button span { bottom: 1px; font-size: 8px; }
  #hv-event-quickbar button small { font-size: 6px; }
}

/* Keep the two landscape HUD edges equally slim. The ticker has its own
   uninterrupted lane before the logo, and the wallet dock stays within the
   lower rail. Pulse only the gold trim so labels remain legible. */
@keyframes hv-hud-rim-pulse {
  0%, 100% { filter: drop-shadow(0 0 2px rgba(255, 190, 62, .25)); }
  50% { filter: drop-shadow(0 0 8px rgba(255, 205, 88, .95)); }
}
@keyframes hv-wallet-gold-pulse {
  0%, 100% { filter: drop-shadow(0 4px 5px #000) drop-shadow(0 0 2px rgba(255, 196, 62, .3)); }
  50% { filter: drop-shadow(0 4px 6px #000) drop-shadow(0 0 13px rgba(255, 216, 95, .95)); }
}
@keyframes hv-rail-pulse {
  0%, 100% { opacity: .25; box-shadow: 0 0 2px rgba(255, 188, 60, .2); }
  50% { opacity: .9; box-shadow: 0 0 10px rgba(255, 209, 95, .9); }
}
html.hv-virtual-landscape #hv-ui-root::before,
html.hv-virtual-landscape #hv-ui-root::after {
  content:""; position:absolute; left:0; width:100%; height:2px;
  z-index:10005; pointer-events:none;
  background:linear-gradient(90deg,transparent,#f6c96e 12%,#fff2ad 50%,#f6c96e 88%,transparent);
  animation:hv-rail-pulse 2.6s ease-in-out infinite;
}
html.hv-virtual-landscape #hv-ui-root::before { top:0; }
html.hv-virtual-landscape #hv-ui-root::after { bottom:0; animation-delay:1.3s; }
#hv-top-notices .hv-top-notice-left,
#hv-event-quickbar.is-visible,
#hv-wallet-actions.is-visible::before { animation: hv-hud-rim-pulse 2.6s ease-in-out infinite; }
#hv-event-quickbar.is-visible { animation-delay: .65s; }
#hv-wallet-actions.is-visible::before { animation-delay: 1.2s; }
#hv-wallet-actions.is-visible .hv-wallet-btn { animation: hv-wallet-gold-pulse 2.4s ease-in-out infinite; }
#hv-wallet-actions.is-visible .hv-wallet-btn[data-open="withdraw"] { animation-delay: 1.2s; }
@media (hover: none) and (pointer: coarse),
       (max-width: 600px) and (orientation: portrait) {
  #hv-top-notices,
  html.hv-virtual-landscape #hv-top-notices {
    top: 3px; left: 2px; right: auto; width: 38%; height: 36px;
    grid-template-columns: minmax(0, 1fr); font-size: 10px;
  }
  #hv-top-notices .hv-top-notice-left,
  html.hv-virtual-landscape #hv-top-notices .hv-top-notice-left {
    margin-left: 55px; padding: 0 7px; clip-path: none;
  }
  #hv-event-quickbar,
  html.hv-virtual-landscape #hv-event-quickbar {
    top: 3px; right: 2px; left: auto; width: 38%; height: 39px;
  }
  #hv-wallet-actions,
  html.hv-virtual-landscape #hv-wallet-actions { width: 170px; height: 53px; }
  #hv-wallet-actions::before { inset: 4px 0 0; }
  .hv-wallet-btn,
  html.hv-virtual-landscape .hv-wallet-btn { width: 52px; height: 51px; bottom: 1px; }
  .hv-wallet-asset,
  html.hv-virtual-landscape .hv-wallet-asset { height: 47px; }
  .hv-wallet-btn-label,
  html.hv-virtual-landscape .hv-wallet-btn-label { min-width: 38px; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  #hv-top-notices .hv-top-notice-left,
  #hv-event-quickbar.is-visible,
  #hv-wallet-actions.is-visible::before,
  #hv-wallet-actions.is-visible .hv-wallet-btn,
  html.hv-virtual-landscape #hv-ui-root::before,
  html.hv-virtual-landscape #hv-ui-root::after { animation: none; }
}

/* On phones the Cocos surface is landscape even while the browser reports a
   portrait viewport. A three-tab game keeps each lottery panel aligned with
   that surface and gives the form, ticket, and results a full touch area. */
@media (hover: none) and (pointer: coarse),
       (max-width: 600px) and (orientation: portrait) {
  #hv-lottery-overlay { padding: 5px; }
  #hv-lottery-overlay .hv-lottery-game {
    width: calc(100% - 4px); height: calc(100% - 4px);
    grid-template-rows: 45px 38px 0 minmax(0, 1fr);
    padding: 0 9px 10px; border-radius: 15px;
  }
  #hv-lottery-overlay .hv-lottery-header {
    grid-template-columns: 38px minmax(0, 1fr) 118px;
    gap: 7px; padding: 0 11px;
  }
  #hv-lottery-overlay .hv-lottery-close { width: 35px; height: 35px; }
  #hv-lottery-overlay .hv-lottery-brand strong { font-size: 22px; }
  #hv-lottery-overlay .hv-lottery-brand small { margin-top: 0; font-size: 8px; }
  #hv-lottery-overlay .hv-lottery-balance { padding: 4px 8px; font-size: 8px; }
  #hv-lottery-overlay .hv-lottery-balance b { margin-top: 0; font-size: 14px; }
  #hv-lottery-overlay .hv-lottery-mobile-tabs {
    display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:5px;
    align-items:center; min-width:0; padding:2px 11px;
  }
  #hv-lottery-overlay .hv-lottery-mobile-tabs button {
    min-width:0; min-height:30px; padding:3px 5px;
    border:1px solid #98713e; border-radius:5px;
    background:linear-gradient(#34251a,#130d0a);
    color:#dfc795; font:800 13px/1 "HV368 Display",Arial,sans-serif;
    white-space:nowrap; cursor:pointer;
  }
  #hv-lottery-overlay .hv-lottery-mobile-tabs button[aria-pressed="true"] {
    border-color:#f3cf81; background:linear-gradient(#bd863b,#664016 55%,#35200b);
    box-shadow:inset 0 1px #fff0ba,0 0 6px #d9953d;
    color:#fff7d5;
  }
  #hv-lottery-overlay .hv-lottery-layout {
    display:block; min-height:0; overflow:hidden; padding:5px 10px 8px;
  }
  #hv-lottery-overlay .hv-lottery-layout>section {
    box-sizing:border-box; display:none; width:min(750px,100%); height:100%;
    min-height:0; margin:0 auto; padding:6px 15px 13px;
    overflow:auto; border-width:11px;
    scrollbar-width:thin; scrollbar-color:#76552b #1d130b;
  }
  #hv-lottery-overlay[data-mobile-view="bet"] .hv-lottery-betbox,
  #hv-lottery-overlay[data-mobile-view="slip"] .hv-lottery-classic-slip,
  #hv-lottery-overlay[data-mobile-view="results"] .hv-lottery-classic-results { display:block; }
  #hv-lottery-overlay .hv-lottery-panel-title { min-height:25px; margin:0 0 5px; padding-bottom:4px; font-size:13px; }
  #hv-lottery-overlay .hv-lottery-classic-types { gap:5px; }
  #hv-lottery-overlay .hv-lottery-classic-types button,
  #hv-lottery-overlay .hv-lottery-classic-regions button,
  #hv-lottery-overlay .hv-lottery-chips button { min-height:35px; }
  #hv-lottery-overlay .hv-lottery-classic-subtypes { margin-top:6px; }
  #hv-lottery-overlay .hv-lottery-classic-subtypes button { min-height:31px; }
  #hv-lottery-overlay .hv-lottery-classic-rate { margin:6px 0; line-height:1.35; }
  #hv-lottery-overlay .hv-lottery-classic-number { margin:7px 0; }
  #hv-lottery-overlay .hv-lottery-classic-number>span { margin-bottom:4px; }
  #hv-lottery-overlay .hv-lottery-classic-number input { padding:7px 0; font-size:17px; }
  #hv-lottery-overlay .hv-lottery-chips { gap:5px; }
  #hv-lottery-overlay .hv-lottery-help { margin-top:6px; line-height:1.35; }
  #hv-lottery-overlay .hv-lottery-classic-clock { margin:0; font-size:20px; }
  #hv-lottery-overlay .hv-lottery-classic-round { padding:5px 0; }
  #hv-lottery-overlay .hv-lottery-classic-regions { margin:6px 0; }
  #hv-lottery-overlay .hv-lottery-classic-stake { margin:7px 0; }
  #hv-lottery-overlay .hv-lottery-classic-stake>span { margin-bottom:4px; }
  #hv-lottery-overlay .hv-lottery-classic-stake input { padding:7px 0; }
  #hv-lottery-overlay .hv-lottery-summary { gap:3px; margin:5px 0; padding:6px 0; }
  #hv-lottery-overlay .hv-lottery-summary b { font-size:22px; }
  #hv-lottery-overlay .hv-lottery-submit { min-height:37px; }
  #hv-lottery-overlay .hv-lottery-message { margin-top:5px; }
  #hv-lottery-overlay .hv-lottery-classic-side-tabs { margin:0 0 5px; }
  #hv-lottery-overlay .hv-lottery-classic-prize { min-height:32px; }
}

/* The lottery dialog lives outside the rotated lobby root. On a portrait
   phone, use the full physical viewport and leave room for readable controls. */
@media (max-width: 600px) and (orientation: portrait) {
  #hv-lottery-overlay {
    padding: max(5px, env(safe-area-inset-top)) 5px max(5px, env(safe-area-inset-bottom));
  }
  #hv-lottery-overlay .hv-lottery-game {
    width: 100%;
    height: 100%;
    grid-template-rows: 59px 47px 0 minmax(0, 1fr);
    padding: 0 8px 12px;
  }
  #hv-lottery-overlay .hv-lottery-header {
    grid-template-columns: 46px minmax(0, 1fr) 98px;
    gap: 5px;
    padding: 0 8px;
  }
  #hv-lottery-overlay .hv-lottery-close { width: 43px; height: 43px; }
  #hv-lottery-overlay .hv-lottery-brand strong { font-size: 23px; }
  #hv-lottery-overlay .hv-lottery-balance { padding: 5px; }
  #hv-lottery-overlay .hv-lottery-balance b { font-size: 13px; }
  #hv-lottery-overlay .hv-lottery-mobile-tabs { padding: 2px 4px; }
  #hv-lottery-overlay .hv-lottery-mobile-tabs button { min-height: 39px; font-size: 12px; }
  #hv-lottery-overlay .hv-lottery-layout { padding: 7px 3px 2px; }
  #hv-lottery-overlay .hv-lottery-layout>section { padding: 8px 12px 13px; }
  #hv-lottery-overlay .hv-lottery-panel-title { font-size: 15px; }
  #hv-lottery-overlay .hv-lottery-classic-types button,
  #hv-lottery-overlay .hv-lottery-classic-regions button,
  #hv-lottery-overlay .hv-lottery-chips button { min-height: 43px; font-size: 13px; }
  #hv-lottery-overlay .hv-lottery-classic-number input,
  #hv-lottery-overlay .hv-lottery-classic-stake input { font-size: 18px; }
  #hv-lottery-overlay .hv-lottery-submit { min-height: 44px; }
}

/* Phone lobby: ticker and offers occupy separate header lanes. Both ticker
   halves remain visible around the logo, above the smaller offer icons. */
@media (hover: none) and (pointer: coarse),
       (max-width: 600px) and (orientation: portrait) {
  #hv-top-notices,
  html.hv-virtual-landscape #hv-top-notices {
    top: 3px;
    left: 2px;
    right: 2px;
    width: auto;
    height: 32px;
    grid-template-columns: minmax(0, 1fr) clamp(180px, 24svh, 225px) minmax(0, 1fr);
    font-size: 10px;
  }
  #hv-top-notices .hv-notice-logo-gap {
    display: block;
    visibility: hidden;
  }
  #hv-top-notices .hv-top-notice-left,
  html.hv-virtual-landscape #hv-top-notices .hv-top-notice-left {
    margin-left: 55px;
    padding: 0 7px;
  }
  #hv-top-notices .hv-top-notice-right,
  html.hv-virtual-landscape #hv-top-notices .hv-top-notice-right {
    display: flex;
    padding: 0 7px;
    clip-path: none;
  }
  #hv-top-notices .hv-top-notice {
    position: relative;
    border: 0;
    border-radius: 0;
    background: linear-gradient(180deg, rgba(24, 15, 10, .76), rgba(13, 10, 8, .68));
    box-shadow: none;
    clip-path: none;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 12px, #000 calc(100% - 12px), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 12px, #000 calc(100% - 12px), transparent);
  }
  #hv-top-notices .hv-top-notice::after {
    content: '';
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #cba061aa 20%, #f0c784cc 50%, #cba061aa 80%, transparent);
    pointer-events: none;
  }
  #hv-top-notices .hv-top-notice-left,
  #hv-top-notices .hv-top-notice-right { animation: none; }
  /* The phone's native lobby rail already frames these two buttons. */
  #hv-wallet-actions,
  html.hv-virtual-landscape #hv-wallet-actions {
    width: 140px;
    left: calc(50% + var(--hv-wallet-slot-extra, 15px));
    height: clamp(45px, 5.8svh, 64px);
    background: transparent;
    box-shadow: none;
  }
  #hv-wallet-actions .hv-wallet-btn,
  html.hv-virtual-landscape #hv-wallet-actions .hv-wallet-btn {
    width: clamp(34px, 4.45svh, 57px);
    height: clamp(37px, 4.7svh, 60px);
    bottom: 1px;
  }
  #hv-wallet-actions .hv-wallet-asset,
  html.hv-virtual-landscape #hv-wallet-actions .hv-wallet-asset {
    height: calc(100% - 5px);
  }
  #hv-wallet-actions .hv-wallet-btn-label,
  html.hv-virtual-landscape #hv-wallet-actions .hv-wallet-btn-label {
    min-width: clamp(28px, 3svh, 38px);
    padding: 1px 3px;
    font-size: clamp(8px, .85svh, 11px);
  }
  #hv-wallet-actions::before,
  #hv-wallet-actions::after {
    content: none;
    display: none;
    animation: none;
  }
  #hv-wallet-actions .hv-wallet-btn[data-open="deposit"],
  html.hv-virtual-landscape #hv-wallet-actions .hv-wallet-btn[data-open="deposit"] {
    right: calc(50% + 4px + var(--hv-wallet-slot-extra, 15px));
  }
  #hv-wallet-actions .hv-wallet-btn[data-open="withdraw"],
  html.hv-virtual-landscape #hv-wallet-actions .hv-wallet-btn[data-open="withdraw"] {
    left: calc(50% + 4px + var(--hv-wallet-slot-extra, 15px));
  }
  #hv-event-quickbar,
  html.hv-virtual-landscape #hv-event-quickbar {
    top: 36px;
    right: 2px;
    left: auto;
    width: 36%;
    height: 37px;
  }
  #hv-event-quickbar button img,
  html.hv-virtual-landscape #hv-event-quickbar button img,
  #hv-event-quickbar button[data-event-quick="referral"] img,
  html.hv-virtual-landscape #hv-event-quickbar button[data-event-quick="referral"] img {
    top: -2px;
    width: 33px;
    height: 32px;
    object-fit: contain;
  }
  #hv-event-quickbar button span,
  html.hv-virtual-landscape #hv-event-quickbar button span {
    bottom: 0;
    font-size: 8.5px;
  }
  #hv-event-quickbar button small,
  html.hv-virtual-landscape #hv-event-quickbar button small { font-size: 6.5px; }
}

/* Keep every transfer control inside the short landscape popup on phones.
   The two input columns preserve the record popup skin and leave the action
   and history buttons visible without centering overflowing form content. */
@media (hover: none) and (pointer: coarse),
       (max-width: 600px) and (orientation: portrait) {
  #hv-wallet-overlay[data-pane="transfer-money"] .hv-content,
  html.hv-virtual-landscape #hv-wallet-overlay[data-pane="transfer-money"] .hv-content {
    display: block;
    padding: 8px 12px;
    overflow: auto;
  }
  #hv-wallet-overlay[data-pane="transfer-money"] .hv-transfer-form,
  html.hv-virtual-landscape #hv-wallet-overlay[data-pane="transfer-money"] .hv-transfer-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "fee fee"
      "balance balance"
      "recipient amount"
      "recipient-status amount-label"
      "reason total"
      "history submit"
      "status status";
    align-content: center;
    align-items: center;
    justify-content: normal;
    gap: 3px 12px;
    width: min(720px, 100%);
    min-height: 100%;
    margin: 0 auto;
    padding: 0;
  }
  #hv-wallet-overlay[data-pane="transfer-money"] .hv-transfer-fee {
    grid-area: fee;
    margin: 0;
    font-size: 14px;
    line-height: 1.2;
  }
  #hv-wallet-overlay[data-pane="transfer-money"] .hv-transfer-balance {
    grid-area: balance;
    margin: 0;
    text-align: center;
    font-size: 17px;
    line-height: 1.2;
  }
  #hv-wallet-overlay[data-pane="transfer-money"] .hv-transfer-balance b { margin-left: 8px; }
  #hv-wallet-overlay[data-pane="transfer-money"] [name="recipient"] { grid-area: recipient; }
  #hv-wallet-overlay[data-pane="transfer-money"] [name="amountVnd"] { grid-area: amount; }
  #hv-wallet-overlay[data-pane="transfer-money"] .hv-transfer-recipient {
    grid-area: recipient-status;
    min-height: 0;
    margin: 0;
    font-size: 11px;
  }
  #hv-wallet-overlay[data-pane="transfer-money"] .hv-transfer-amount {
    grid-area: amount-label;
    margin: 0;
    font-size: 12px;
    white-space: nowrap;
  }
  #hv-wallet-overlay[data-pane="transfer-money"] .hv-transfer-amount b { margin-left: 4px; }
  #hv-wallet-overlay[data-pane="transfer-money"] [name="reason"] { grid-area: reason; }
  #hv-wallet-overlay[data-pane="transfer-money"] .hv-transfer-total {
    grid-area: total;
    font-size: 12px;
    line-height: 1.3;
  }
  #hv-wallet-overlay[data-pane="transfer-money"] .hv-transfer-submit {
    grid-area: submit;
    justify-self: end;
    min-width: 150px;
    min-height: 38px;
    margin: 0;
    font-size: 18px;
  }
  #hv-wallet-overlay[data-pane="transfer-money"] .hv-transfer-history {
    grid-area: history;
    position: static;
    justify-self: start;
    align-self: center;
    min-height: 34px;
    margin: 0;
    font-size: 18px;
  }
  #hv-wallet-overlay[data-pane="transfer-money"] .hv-transfer-history span { font-size: 11px; }
  #hv-wallet-overlay[data-pane="transfer-money"] .hv-transfer-form .hv-status {
    grid-area: status;
    min-height: 0;
    margin: 0;
    font-size: 11px;
  }
  #hv-wallet-overlay[data-pane="transfer-money"] .hv-transfer-input {
    min-height: 38px;
    padding: 5px 10px;
    font-size: 15px;
  }
}

/* Tài Xỉu renders these footer controls in the Cocos footer, beneath its
   native dimmer and game panels. Keep their HTML boxes measurable for layout. */
html.hv-tai-xiu-native-footer #hv-wallet-actions,
html.hv-tai-xiu-native-footer #hv-support-shortcut,
html.hv-tai-xiu-native-footer #hv-toolbar-captions {
  visibility: hidden !important;
  pointer-events: none !important;
}
