.v5-header .right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.timi-language-switch {
  position: relative;
  z-index: 1200;
  flex: 0 0 auto;
  font-family: "Noto Sans Myanmar", "Myanmar Text", Padauk, Arial, sans-serif;
}

.timi-language-button {
  height: 38px;
  min-width: 84px;
  padding: 0 8px;
  border: 1px solid #dcefe9;
  border-radius: 19px;
  background: #f4fbf8;
  color: #079d7c;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font: inherit;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 7px rgba(15, 158, 125, 0.08);
  -webkit-tap-highlight-color: transparent;
}

.timi-language-button:active,
.timi-language-switch.is-open .timi-language-button {
  background: #e8f8f3;
  border-color: #1caf8d;
}

.timi-language-globe {
  font-size: 15px;
  line-height: 1;
}

.timi-language-current {
  white-space: nowrap;
  font-weight: 600;
}

.timi-language-arrow {
  color: #76bbaa;
  font-size: 10px;
  transition: transform 0.18s ease;
}

.timi-language-switch.is-open .timi-language-arrow {
  transform: rotate(180deg);
}

.timi-language-menu {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  width: 142px;
  padding: 6px;
  border: 1px solid #e4eee9;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(26, 75, 65, 0.18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-5px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
}

.timi-language-switch.is-open .timi-language-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.timi-language-option {
  width: 100%;
  min-height: 38px;
  padding: 7px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #3d4b47;
  display: grid;
  grid-template-columns: 22px 1fr 16px;
  align-items: center;
  gap: 6px;
  text-align: left;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.timi-language-option:hover,
.timi-language-option.is-active {
  background: #ebf9f5;
  color: #079d7c;
}

.timi-language-flag {
  font-size: 17px;
}

.timi-language-check {
  opacity: 0;
  color: #079d7c;
  font-weight: 700;
}

.timi-language-option.is-active .timi-language-check {
  opacity: 1;
}

html[lang="my"] body,
html[lang="my"] button,
html[lang="my"] input,
html[lang="my"] textarea {
  font-family: "Noto Sans Myanmar", "Myanmar Text", Padauk, Arial, sans-serif;
}

html[lang="ko"] body,
html[lang="ko"] button,
html[lang="ko"] input,
html[lang="ko"] textarea {
  font-family: "Noto Sans KR", "Malgun Gothic", "Apple SD Gothic Neo", Arial, sans-serif;
}

/* Keep the home category rail aligned when translated labels are longer. */
html[lang="my"] .v5-game-container .sidebar,
html[lang="vi"] .v5-game-container .sidebar,
html[lang="ko"] .v5-game-container .sidebar {
  width: 96px;
}

html[lang="my"] .v5-game-container .side-item,
html[lang="vi"] .v5-game-container .side-item,
html[lang="ko"] .v5-game-container .side-item {
  width: 96px;
  height: 58px;
  min-height: 58px;
  padding: 0 7px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  justify-content: initial;
  column-gap: 5px;
}

html[lang="my"] .v5-game-container .side-icon-box,
html[lang="vi"] .v5-game-container .side-icon-box,
html[lang="ko"] .v5-game-container .side-icon-box {
  width: 24px;
  height: 24px;
  justify-self: center;
  flex: none;
}

html[lang="my"] .v5-game-container .side-text,
html[lang="vi"] .v5-game-container .side-text,
html[lang="ko"] .v5-game-container .side-text {
  width: 100%;
  min-width: 0;
  margin: 0;
  white-space: normal;
  overflow: hidden;
  overflow-wrap: anywhere;
  text-align: left;
  line-height: 1.28;
  text-overflow: clip;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

html[lang="my"] .v5-game-container .side-text {
  font-size: 10px;
}

html[lang="vi"] .v5-game-container .side-text,
html[lang="ko"] .v5-game-container .side-text {
  font-size: 11px;
}

html[lang="my"] .v5-game-container .content-area,
html[lang="vi"] .v5-game-container .content-area,
html[lang="ko"] .v5-game-container .content-area {
  padding-left: 8px;
  padding-right: 8px;
}

/* Give translated account shortcuts enough room to wrap without colliding. */
html[lang="my"] .v5-quick .custom-popup,
html[lang="vi"] .v5-quick .custom-popup,
html[lang="ko"] .v5-quick .custom-popup {
  width: calc(100% - 24px);
  height: auto;
  max-height: 280px;
  overflow: hidden;
}

html[lang="my"] .v5-quick .more-menu-grid,
html[lang="vi"] .v5-quick .more-menu-grid,
html[lang="ko"] .v5-quick .more-menu-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  height: auto;
  max-height: 280px;
  padding: 8px;
  column-gap: 4px;
  row-gap: 4px;
  align-content: start;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

html[lang="my"] .v5-quick .more-menu-grid::-webkit-scrollbar,
html[lang="vi"] .v5-quick .more-menu-grid::-webkit-scrollbar,
html[lang="ko"] .v5-quick .more-menu-grid::-webkit-scrollbar {
  display: none;
}

html[lang="my"] .v5-quick .menu-item,
html[lang="vi"] .v5-quick .menu-item,
html[lang="ko"] .v5-quick .menu-item {
  width: 100%;
  min-width: 0;
  height: 60px;
  gap: 2px;
}

html[lang="my"] .v5-quick .menu-icon-img,
html[lang="vi"] .v5-quick .menu-icon-img,
html[lang="ko"] .v5-quick .menu-icon-img {
  width: 28px;
  height: 28px;
}

html[lang="my"] .v5-quick .menu-item span,
html[lang="vi"] .v5-quick .menu-item span,
html[lang="ko"] .v5-quick .menu-item span {
  width: 100%;
  min-width: 0;
  min-height: 24px;
  margin: 0;
  white-space: normal;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: normal;
  text-align: center;
  line-height: 1.15;
  text-overflow: clip;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

html[lang="my"] .v5-quick .menu-item span {
  font-size: 9px;
}

html[lang="vi"] .v5-quick .menu-item span,
html[lang="ko"] .v5-quick .menu-item span {
  font-size: 9.5px;
}

/* Keep guest actions and quick links balanced with longer translations. */
html[lang="my"] .v5-quick .auth-btns {
  flex: 0 0 43%;
  gap: 6px;
  margin-right: 7px;
  min-width: 0;
}

html[lang="vi"] .v5-quick .auth-btns,
html[lang="ko"] .v5-quick .auth-btns {
  flex: 0 0 40%;
  gap: 6px;
  margin-right: 7px;
  min-width: 0;
}

html[lang="my"] .v5-quick .auth-btns .btn,
html[lang="vi"] .v5-quick .auth-btns .btn,
html[lang="ko"] .v5-quick .auth-btns .btn {
  min-width: 0;
  height: 38px;
  padding: 0 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  line-height: 1;
  text-align: center;
}

html[lang="my"] .v5-quick .auth-btns .btn {
  font-size: 10px;
}

html[lang="vi"] .v5-quick .auth-btns .btn,
html[lang="ko"] .v5-quick .auth-btns .btn {
  font-size: 11px;
}

html[lang="my"] .v5-quick .quick-icons,
html[lang="vi"] .v5-quick .quick-icons,
html[lang="ko"] .v5-quick .quick-icons {
  min-width: 0;
  gap: 3px;
  justify-content: space-between;
}

html[lang="my"] .v5-quick .q-item,
html[lang="vi"] .v5-quick .q-item,
html[lang="ko"] .v5-quick .q-item {
  flex: 1 1 0;
  min-width: 0;
  gap: 3px;
}

html[lang="my"] .v5-quick .q-item span,
html[lang="vi"] .v5-quick .q-item span,
html[lang="ko"] .v5-quick .q-item span {
  width: 100%;
  min-width: 0;
  min-height: 23px;
  margin: 0;
  white-space: normal;
  overflow: hidden;
  overflow-wrap: anywhere;
  text-align: center;
  line-height: 1.15;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

html[lang="my"] .v5-quick .q-item span {
  font-size: 9px;
}

html[lang="vi"] .v5-quick .q-item span {
  font-size: 9.5px;
}

html[lang="ko"] .v5-quick .q-item span {
  font-size: 10px;
}

@media (max-width: 374px) {
  .v5-header .right {
    gap: 6px;
  }

  .timi-language-button {
    min-width: 70px;
    padding: 0 6px;
  }

  .timi-language-current {
    max-width: 42px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

.timi-member-language-overlay {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  background: rgba(16, 30, 27, 0.46);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s;
  font-family: "Noto Sans Myanmar", "Myanmar Text", Padauk, Arial, sans-serif;
}

.timi-member-language-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

.timi-member-language-panel {
  width: min(100%, 480px);
  padding: 8px 16px max(18px, env(safe-area-inset-bottom));
  border-radius: 20px 20px 0 0;
  background: #fff;
  box-shadow: 0 -12px 40px rgba(12, 65, 53, 0.18);
  transform: translateY(100%);
  transition: transform 0.22s ease;
}

.timi-member-language-overlay.is-visible .timi-member-language-panel {
  transform: translateY(0);
}

.timi-member-language-handle {
  width: 38px;
  height: 4px;
  margin: 0 auto 12px;
  border-radius: 2px;
  background: #d9e4e0;
}

.timi-member-language-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 4px 13px;
  color: #263b35;
}

.timi-member-language-heading strong {
  font-size: 17px;
}

.timi-member-language-heading span {
  color: #84908d;
  font-size: 13px;
}

.timi-member-language-options {
  display: grid;
  gap: 10px;
}

.timi-member-language-option {
  min-height: 66px;
  padding: 10px 14px;
  border: 1px solid #e4ece9;
  border-radius: 13px;
  background: #fff;
  color: #34453f;
  display: grid;
  grid-template-columns: 36px 1fr 24px;
  align-items: center;
  gap: 10px;
  text-align: left;
  font: inherit;
}

.timi-member-language-option.is-active {
  border-color: #14aa87;
  background: #edf9f6;
  color: #078d70;
}

.timi-member-language-flag {
  font-size: 25px;
}

.timi-member-language-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.timi-member-language-text strong {
  font-size: 15px;
}

.timi-member-language-text small {
  color: #8a9692;
  font-size: 12px;
}

.timi-member-language-check {
  color: #0aa17f;
  font-size: 20px;
  font-weight: 700;
  opacity: 0;
}

.timi-member-language-option.is-active .timi-member-language-check {
  opacity: 1;
}

.timi-member-language-cancel {
  width: 100%;
  height: 44px;
  margin-top: 12px;
  border: 0;
  border-radius: 12px;
  background: #f3f6f5;
  color: #5e6a66;
  font: inherit;
  font-size: 14px;
}

/* Keep longer translated lottery names readable without changing Chinese cards. */
html[lang="vi"] .lottery-hall .card-info,
html[lang="ko"] .lottery-hall .card-info,
html[lang="my"] .lottery-hall .card-info {
  min-height: 40px;
  padding: 5px 3px;
  display: flex;
  align-items: center;
  justify-content: center;
}

html[lang="vi"] .lottery-hall .card-title,
html[lang="ko"] .lottery-hall .card-title,
html[lang="my"] .lottery-hall .card-title {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
  text-overflow: clip;
  word-break: break-word;
  font-size: 10px;
  line-height: 1.25;
}

html[lang="vi"] .lottery-hall .cat-name,
html[lang="ko"] .lottery-hall .cat-name,
html[lang="my"] .lottery-hall .cat-name {
  font-size: 9px;
  line-height: 1.25;
}

/* Lottery betting screens use compact controls; allow translated labels to wrap. */
html[lang="vi"] .lottery-page-cyber .cyber-tabs .van-tab,
html[lang="ko"] .lottery-page-cyber .cyber-tabs .van-tab,
html[lang="my"] .lottery-page-cyber .cyber-tabs .van-tab {
  padding: 0 10px !important;
  font-size: 11px !important;
  line-height: 1.2;
}

html[lang="vi"] .lottery-page-cyber .bet-chip .chip-text,
html[lang="ko"] .lottery-page-cyber .bet-chip .chip-text,
html[lang="my"] .lottery-page-cyber .bet-chip .chip-text {
  padding: 2px;
  font-size: 11px !important;
  line-height: 1.15;
  text-align: center;
  white-space: normal;
}

html[lang="vi"] .lottery-page-cyber .bet-card .main-number,
html[lang="ko"] .lottery-page-cyber .bet-card .main-number,
html[lang="my"] .lottery-page-cyber .bet-card .main-number {
  padding: 0 2px;
  font-size: 16px !important;
  line-height: 1.15;
  text-align: center;
  white-space: normal;
}

html[lang="vi"] .lottery-page-cyber .betting-footer-cyber .cyber-btn,
html[lang="ko"] .lottery-page-cyber .betting-footer-cyber .cyber-btn,
html[lang="my"] .lottery-page-cyber .betting-footer-cyber .cyber-btn {
  padding: 0 5px;
  font-size: 11px !important;
  line-height: 1.15;
}

/* Keep translated live-casino platform and game labels readable. */
html[lang="vi"] .slot-page .platform-item,
html[lang="ko"] .slot-page .platform-item,
html[lang="my"] .slot-page .platform-item {
  box-sizing: border-box;
  width: 126px !important;
  height: 48px !important;
  min-height: 48px;
  padding: 0 5px 0 7px !important;
  align-items: center;
  justify-content: flex-start;
}

html[lang="vi"] .slot-page .platform-sidebar,
html[lang="ko"] .slot-page .platform-sidebar,
html[lang="my"] .slot-page .platform-sidebar {
  box-sizing: border-box;
  width: 136px !important;
  flex: 0 0 136px;
}

html[lang="vi"] .slot-page .platform-item .p-icon,
html[lang="ko"] .slot-page .platform-item .p-icon,
html[lang="my"] .slot-page .platform-item .p-icon {
  width: 28px;
  min-width: 28px;
  flex: 0 0 28px;
}

html[lang="vi"] .slot-page .platform-item .p-name,
html[lang="ko"] .slot-page .platform-item .p-name,
html[lang="my"] .slot-page .platform-item .p-name {
  flex: 1;
  min-width: 0;
  margin: 0 0 0 5px !important;
  font-size: 12px !important;
  font-weight: 500;
  line-height: 1.15;
  text-align: left;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: normal;
}

html[lang="vi"] .slot-page .game-item .game-name,
html[lang="ko"] .slot-page .game-item .game-name,
html[lang="my"] .slot-page .game-item .game-name {
  font-size: 12px !important;
  line-height: 1.2;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* Reflow the game grid after the translated platform sidebar becomes wider. */
html[lang="vi"] .slot-page .slot-main,
html[lang="ko"] .slot-page .slot-main,
html[lang="my"] .slot-page .slot-main {
  width: 0;
  min-width: 0;
  flex: 1 1 0%;
}

html[lang="vi"] .slot-page .game-scroll-area,
html[lang="ko"] .slot-page .game-scroll-area,
html[lang="my"] .slot-page .game-scroll-area {
  box-sizing: border-box;
  width: 100%;
  padding-left: 7px !important;
  padding-right: 7px !important;
  overflow-x: hidden;
}

html[lang="vi"] .slot-page .game-grid,
html[lang="ko"] .slot-page .game-grid,
html[lang="my"] .slot-page .game-grid {
  box-sizing: border-box;
  width: 100%;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  column-gap: 6px !important;
  justify-items: center;
}

html[lang="vi"] .slot-page .game-card,
html[lang="ko"] .slot-page .game-card,
html[lang="my"] .slot-page .game-card {
  box-sizing: border-box;
  width: 100% !important;
  max-width: 74px;
  min-width: 0;
}

html[lang="vi"] .slot-page .game-cover-box,
html[lang="ko"] .slot-page .game-cover-box,
html[lang="my"] .slot-page .game-cover-box {
  box-sizing: border-box;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 1 / 1;
}

html[lang="vi"] .slot-page .game-card .game-name,
html[lang="ko"] .slot-page .game-card .game-name,
html[lang="my"] .slot-page .game-card .game-name {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
