/* Layout extensions & full H5 mobile/landscape adaptive system */
html, body {
  max-width: 100vw;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body, input, button, select {
  font-family: "Outfit", "Segoe UI", "Noto Sans SC", "Noto Sans Thai", "Noto Sans Lao", "Noto Sans Khmer", "Microsoft YaHei", "Leelawadee UI", Tahoma, sans-serif;
}

[hidden] { display: none !important; }

/* Prevent vertical 1-character text wrapping in header badges, nav items & action buttons */
.brand-logo,
.brand-text,
.brand-title,
.brand-subtitle,
.nav-item,
.header-actions,
.wallet-badge,
.wallet-label,
.wallet-balance,
.btn-action-primary,
.btn-action-secondary,
.theme-switch-btn,
.marquee-badge {
  white-space: nowrap;
  flex-shrink: 0;
}

.integration-notice {
  padding: 14px 18px;
  margin-bottom: 18px;
  border: 1px solid var(--border-gold);
  border-radius: 10px;
  color: var(--gold-primary);
  background: var(--bg-secondary);
}

.integration-empty {
  padding: 26px;
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  background: var(--bg-card);
  color: var(--text-secondary);
  min-height: 150px;
}

.integration-empty h2 { color: var(--text-primary); margin-bottom: 14px; }
.integration-empty p { margin: 12px 0 18px; }
.integration-muted, .integration-contact { color: var(--text-secondary); font-size: 13px; margin: 12px 0; line-height: 1.7; }

.integration-game-art {
  display: grid;
  place-items: center;
  padding-top: 0;
  aspect-ratio: 1 / 1;
  background: radial-gradient(circle at 50% 30%, #12516a, var(--bg-primary));
  position: relative;
  overflow: hidden;
}

.integration-game-symbol { font-size: 86px; color: var(--gold-primary); text-shadow: var(--shadow-glow-gold); }
.slot-card { height: 100%; display: flex; flex-direction: column; }
.slot-info { display: flex; flex-direction: column; flex: 1; justify-content: space-between; padding: 12px; gap: 4px; min-height: 112px; }
.slot-title { font-size: 13.5px; font-weight: 800; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.35; }
.slot-provider { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3; }
.integration-play { margin-top: 10px; width: 100%; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; text-align: center; line-height: 1.2; }

.slot-img-wrap.is-localized-cover .slot-img {
  object-fit: cover;
  object-position: center center;
}

.slot-img-locale-badge {
  display: none !important;
}

button:disabled { opacity: .55; cursor: not-allowed; }
.integration-service { display: flex; align-items: center; gap: 12px; margin: 22px 0; flex-wrap: wrap; }

/* Global filter bar across all game catalog pages (Slots, Fishing, Cards, Live, Lotto, Cockfight) */
.slot-filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 24px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.slot-filter-bar > span {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
}

.slot-filter-bar label {
  display: inline-flex;
  flex-wrap: wrap;
  min-width: 0;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 600;
  flex: 1 1 220px;
  max-width: min(100%, 420px);
}

.slot-filter-bar label span {
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

.slot-filter-bar input.stake-input,
.slot-filter-bar select.stake-input {
  flex: 1 1 120px;
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
}

.profile-content-panel p { margin: 12px 0; line-height: 1.7; }

/* ============================================================================
   Game Modal Dialog: Adaptive Portrait (9:16) & Landscape (16:9) + Mobile 100%
   ============================================================================ */
html.game-modal-open,
body.game-modal-open {
  overflow: hidden !important;
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100vw !important;
  max-height: 100dvh !important;
  overscroll-behavior: none !important;
  touch-action: none !important;
}

.integration-game-dialog {
  background: #05070e;
  color: var(--text-primary);
  border: 1px solid var(--border-gold);
  border-radius: 18px;
  width: min(520px, 96vw, calc(min(920px, 95dvh) * 0.5625));
  height: min(920px, 95dvh);
  max-width: 96vw;
  max-height: 95dvh;
  margin: auto;
  padding: 0;
  box-shadow: 0 14px 48px rgba(0, 0, 0, .88), 0 0 28px rgba(255, 184, 0, .25);
  overflow: hidden;
  touch-action: none;
  overscroll-behavior: none;
  position: fixed;
  inset: 0;
}

/* Desktop Widescreen 16:9 container for Landscape Games (Fishing, Cards, Baccarat, Arcade) */
.integration-game-dialog.is-landscape-game,
.integration-game-dialog[data-rotate-mode="landscape"] {
  width: min(1440px, 96vw, calc(min(840px, 94dvh) * 1.7787));
  height: min(840px, 94dvh, calc(min(1440px, 96vw) * 0.5622));
  max-width: 96vw;
  max-height: 94dvh;
}

.integration-game-dialog::backdrop {
  background: rgba(0, 0, 0, .92);
  backdrop-filter: blur(8px);
}

.integration-game-dialog[open] {
  display: flex;
  flex-direction: column;
}

/* Hide redundant top exit bar since all MJHL/JILI/728/63 games have built-in exit buttons */
.integration-game-head {
  display: none !important;
}

.integration-game-head button {
  padding: 4px 14px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  flex-shrink: 0;
  border-radius: 6px;
}

.integration-game-frame {
  width: 100%;
  height: 100%;
  flex: 1;
  border: 0;
  background: #05070e;
  min-height: 180px;
  display: block;
  overflow: hidden;
  touch-action: none;
}

.integration-game-dialog:fullscreen,
.integration-game-dialog:-webkit-full-screen {
  width: 100vw !important;
  width: 100dvw !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-width: 100vw !important;
  max-width: 100dvw !important;
  max-height: 100vh !important;
  max-height: 100dvh !important;
  border: 0 !important;
  border-radius: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
}

/* ============================================================================
   Full-Viewport Game Modal on ALL Mobile / Tablet / Touch Devices
   (Covers both Portrait AND Landscape phone orientations, zero vertical scroll)
   ============================================================================ */
@media (max-width: 960px), (max-height: 600px), (hover: none) and (pointer: coarse) {
  .integration-game-dialog,
  .integration-game-dialog.is-landscape-game,
  .integration-game-dialog.is-portrait-game,
  .integration-game-dialog[data-rotate-mode="landscape"],
  .integration-game-dialog[data-rotate-mode="portrait"] {
    position: fixed !important;
    inset: 0 !important;
    top: 0 !important;
    left: 0 !important;
    width: var(--u88-vvw, 100dvw) !important;
    height: var(--u88-vvh, 100dvh) !important;
    max-width: 100vw !important;
    max-height: 100dvh !important;
    border: 0 !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    overflow: hidden !important;
    overscroll-behavior: none !important;
    touch-action: none !important;
  }

  .integration-game-head {
    padding: max(4px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) 4px max(10px, env(safe-area-inset-left));
    min-height: 34px;
  }

  .integration-game-head button {
    padding: 4px 12px;
    font-size: 11.5px;
  }
}

/* On narrow Desktop windows (non-touch mouse/trackpad in portrait window), keep Landscape Games in 16:9 widescreen so PC users never see black bars or sideways games */
@media (max-width: 960px) and (hover: hover) and (pointer: fine) and (orientation: portrait) {
  .integration-game-dialog.is-landscape-game,
  .integration-game-dialog[data-rotate-mode="landscape"] {
    width: min(98vw, var(--u88-vvw, 100dvw)) !important;
    height: min(var(--u88-vvh, 95dvh), calc(min(98vw, var(--u88-vvw, 100dvw)) * 0.5625 + 36px)) !important;
    margin: auto !important;
    border: 1px solid var(--border-gold) !important;
    border-radius: 14px !important;
    box-shadow: 0 14px 48px rgba(0, 0, 0, .88), 0 0 28px rgba(255, 184, 0, .25) !important;
  }
}

/* ============================================================================
   H5 Mobile Tablet & Phone Responsive Layout (<= 1024px & <= 768px & <= 480px)
   ============================================================================ */
@media (max-width: 1024px) {
  .main-header {
    flex-wrap: wrap;
    padding: 10px 16px;
    gap: 10px;
  }

  .main-nav {
    order: 3;
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
    gap: 6px;
  }

  .main-nav::-webkit-scrollbar {
    display: none;
  }

  .header-actions {
    margin-left: auto;
    gap: 8px;
  }
}

@media (max-width: 768px) {
  .top-bar {
    height: auto;
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px 12px;
  }

  .top-bar-left {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .top-bar-right {
    width: 100%;
    min-width: 0;
    justify-content: space-between;
    gap: 8px;
  }

  .top-bar-right .lang-selector {
    flex: 1;
    min-width: 0;
  }

  .top-bar-right .lang-selector label {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    width: 100%;
  }

  .top-bar-right select[data-locale] {
    flex: 1;
    min-width: 0;
    width: 0;
  }

  .top-bar-right .theme-switch-btn {
    flex-shrink: 0;
    white-space: nowrap;
  }

  .main-header {
    padding: 8px 12px;
    gap: 8px;
  }

  .brand-icon {
    width: 32px;
    height: 32px;
    font-size: 15px;
  }

  .brand-title {
    font-size: 16px;
  }

  .brand-subtitle {
    font-size: 8.5px;
    letter-spacing: 0.8px;
  }

  .header-actions {
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .wallet-badge {
    padding: 3px 9px;
    gap: 6px;
  }

  .wallet-label {
    font-size: 10px;
  }

  .wallet-balance {
    font-size: 12.5px;
  }

  .btn-action-primary,
  .btn-action-secondary {
    padding: 6px 11px;
    font-size: 12px;
  }

  .nav-item {
    padding: 6px 11px;
    font-size: 12.5px;
  }

  .app-container {
    padding: 14px 12px 56px;
  }

  .hero-section {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 24px;
  }

  .hero-slider-card {
    min-height: 250px;
    padding: 22px 18px;
  }

  .hero-decor-art {
    width: 160px;
    height: 160px;
    right: 10px;
    top: 10px;
    opacity: 0.35;
  }

  .hero-title {
    font-size: clamp(22px, 6vw, 30px);
  }

  .hero-desc {
    font-size: 12.5px;
    margin-bottom: 16px;
  }

  .hero-btn-group {
    flex-wrap: wrap;
    gap: 10px;
  }

  .jackpot-box {
    padding: 16px;
  }

  .jackpot-value {
    font-size: clamp(24px, 6.5vw, 32px);
  }

  .section-header {
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
  }

  .section-title {
    font-size: 19px;
  }

  .slot-filter-bar {
    padding: 12px 14px;
    gap: 10px;
    margin-bottom: 16px;
  }

  .slot-filter-bar label {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .slots-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 28px;
  }

  .slot-info {
    padding: 10px;
    min-height: 98px;
  }

  .slot-title {
    font-size: 12.5px;
  }

  .slot-provider {
    font-size: 10.5px;
  }

  .integration-play {
    margin-top: 6px;
    padding-inline: 6px;
    font-size: 11.5px;
  }

  .game-feature-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .casino-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .vip-table-arena {
    padding: 12px;
  }

  .baccarat-felt {
    padding: 16px 12px;
    border-radius: 20px;
    border-width: 4px;
  }

  .bet-slip-drawer {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    max-width: calc(100vw - 24px);
  }

  .profile-layout {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .profile-sidebar {
    flex-direction: row;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 10px;
    gap: 8px;
  }

  .profile-sidebar::-webkit-scrollbar {
    display: none;
  }

  .profile-tab-btn {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 8px 14px;
  }

  .profile-tab-btn:hover,
  .profile-tab-btn.active {
    border-left: none;
    border-bottom: 2px solid var(--gold-primary);
  }

  .profile-content-panel {
    padding: 18px 14px;
  }

  .login-card-wrap,
  .register-card-wrap {
    margin: 20px auto !important;
    padding: 24px 16px !important;
    width: 100%;
  }

  .master-footer {
    padding: 28px 14px;
    margin-top: 36px;
  }
}

@media (max-width: 480px) {
  .brand-subtitle {
    display: none;
  }

  .wallet-label {
    display: none;
  }

  .table-body {
    grid-template-columns: 1fr;
  }

  .dealer-stream-preview {
    height: 140px;
  }
}

/* ============================================================================
   H5 Mobile Landscape Mode (Phone held horizontally, height <= 540px)
   ============================================================================ */
@media (max-height: 540px) and (orientation: landscape) {
  .integration-game-head {
    padding: 2px max(10px, env(safe-area-inset-right)) 2px max(10px, env(safe-area-inset-left));
    min-height: 30px;
    gap: 6px;
  }

  .integration-game-head strong {
    font-size: 11.5px;
  }

  .integration-game-head > span {
    font-size: 11px;
  }

  .integration-game-head button {
    padding: 2px 8px;
    font-size: 11px;
    min-height: 24px;
  }

  .integration-game-guide-panel {
    max-height: 68dvh;
    padding: 8px 12px;
    font-size: 11.5px;
  }

  .top-bar {
    padding: 3px 12px;
    min-height: 28px;
  }

  .main-header {
    padding: 6px 12px;
    gap: 8px;
  }

  .app-container {
    padding: 10px max(12px, env(safe-area-inset-right)) 32px max(12px, env(safe-area-inset-left));
  }

  .hero-slider-card {
    min-height: 190px;
    padding: 16px 20px;
  }

  .hero-title {
    font-size: 22px;
    margin-bottom: 6px;
  }

  .hero-desc {
    font-size: 12px;
    margin-bottom: 10px;
  }

  .slots-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
  }

  .matches-grid,
  .sports-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .bet-drawer {
    max-height: 92dvh;
    overflow-y: auto;
    padding: 12px 18px 16px;
    gap: 10px;
  }

  .modal-dialog,
  .modal-content-card {
    max-height: 92dvh;
    overflow-y: auto;
  }
}

/* === U88 1688 VIP SKIN, REBATE & AI SUPPORT EXTENSIONS === */
.brand-icon {
  width: 44px;
  height: 44px;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0;
  overflow: visible;
}
.brand-icon img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.announcement-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(212, 175, 55, 0.14);
}
.announcement-row:last-child {
  border-bottom: none;
}
.announcement-bullet {
  color: var(--gold-primary);
  font-weight: 900;
  margin-top: 2px;
}

/* Home Sports Preview Cards */
.home-match-vs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.home-match-team {
  flex: 1;
  font-size: 14px;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.home-match-team:last-child {
  text-align: right;
}
.home-match-score {
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.16);
  border: 1px solid var(--border-gold);
  color: var(--gold-primary);
  font-weight: 800;
  font-size: 12px;
}
.home-match-odds {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.home-odd-pill {
  text-align: center;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--border-subtle);
  font-size: 12px;
  color: var(--gold-secondary);
  font-weight: 700;
}

/* Turnover Rebate & Affiliate Grids */
.rebate-stats-grid,
.affiliate-tier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin: 18px 0;
}
.rebate-stat-card,
.affiliate-tier-card {
  background: linear-gradient(145deg, rgba(22, 21, 29, 0.96), rgba(12, 12, 16, 0.96));
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-card);
}
.rebate-stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
}
.rebate-stat-value {
  font-size: 22px;
  font-weight: 900;
  color: var(--gold-primary);
}
.rebate-action-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  margin: 18px 0;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
}

/* Floating Movable AI Customer Service Widget */
.u88-ai-support-fab {
  position: fixed;
  right: 20px;
  bottom: 24px;
  z-index: 9990;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffe066 0%, #d4af37 55%, #aa7c11 100%);
  color: #120d00;
  border: 1.5px solid #fff3b0;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.75), 0 0 20px rgba(212, 175, 55, 0.45);
  font-size: 13.5px;
  font-weight: 900;
  cursor: grab;
  user-select: none;
  touch-action: none;
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}
.u88-ai-support-fab:active {
  cursor: grabbing;
  transform: scale(0.97);
}
.ai-fab-icon {
  font-size: 18px;
  line-height: 1;
}

.u88-ai-support-panel {
  position: fixed;
  right: 20px;
  bottom: 84px;
  z-index: 9991;
  width: min(390px, calc(100vw - 24px));
  max-height: min(620px, calc(100dvh - 110px));
  background: #0d0d13;
  border: 1px solid var(--border-gold);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), 0 0 28px rgba(212, 175, 55, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.u88-ai-support-panel[hidden] {
  display: none !important;
}
.ai-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.22), rgba(14, 14, 20, 0.98));
  border-bottom: 1px solid var(--border-gold);
}
.ai-panel-head-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.ai-panel-title {
  font-size: 14.5px;
  font-weight: 900;
  color: var(--gold-primary);
}
.ai-panel-subtitle {
  font-size: 11px;
  color: var(--text-secondary);
}
.ai-panel-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  font-size: 20px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ai-panel-nav {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-subtle);
}
.ai-chips-title {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-weight: 700;
}
.ai-nav-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 88px;
  overflow-y: auto;
}
.ai-nav-chip {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.35);
  color: var(--gold-secondary);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}
.ai-nav-chip:hover {
  background: var(--gold-gradient);
  color: #120d00;
}
.ai-chat-body {
  flex: 1;
  min-height: 200px;
  max-height: 310px;
  overflow-y: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ai-msg {
  max-width: 92%;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 12.5px;
  line-height: 1.55;
}
.ai-msg-bot {
  align-self: flex-start;
  background: #171722;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
}
.ai-msg-user {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.28), rgba(212, 175, 55, 0.14));
  border: 1px solid var(--border-gold);
  color: #fff;
}
.ai-msg-text {
  margin: 0;
  overflow-wrap: anywhere;
}
.ai-jump-btn {
  margin-top: 8px;
  width: 100%;
  justify-content: center;
  font-size: 12px;
  padding: 7px 12px;
}
.ai-contact-box {
  margin-top: 10px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(212, 175, 55, 0.3);
}
.ai-contact-heading {
  font-size: 12px;
  font-weight: 800;
  color: var(--gold-primary);
  margin-bottom: 6px;
}
.ai-contact-item {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
}
.ai-contact-line {
  margin: 0 0 4px;
  font-size: 12px;
  color: var(--text-primary);
  overflow-wrap: anywhere;
}
.ai-contact-link {
  display: inline-block;
  font-size: 12px;
  color: var(--gold-secondary);
  text-decoration: underline;
  overflow-wrap: anywhere;
}
.ai-contact-qr-wrap {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}
.ai-contact-qr {
  display: block;
  width: 168px;
  height: 168px;
  max-width: 100%;
  object-fit: contain;
  padding: 6px;
  background: #ffffff;
  border-radius: 10px;
  border: 2px solid var(--gold-primary);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55);
}
.ai-ticket-box {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ai-contact-input {
  width: 100%;
  padding: 8px 10px;
  font-size: 12px;
}
.ai-arrange-btn {
  width: 100%;
  justify-content: center;
  padding: 8px 12px;
  font-size: 12px;
}
.ai-ticket-status {
  font-size: 12px;
  font-weight: 700;
  color: #10b981;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(16, 185, 129, 0.1);
}
.ai-panel-form {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid var(--border-subtle);
  background: #12121a;
}
.ai-chat-input {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  font-size: 12.5px;
}
.ai-chat-send {
  padding: 8px 14px;
  font-size: 12.5px;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .u88-ai-support-fab {
    right: 12px;
    bottom: 16px;
    padding: 10px 14px;
    font-size: 12px;
  }
  .u88-ai-support-panel {
    right: 12px;
    left: 12px;
    bottom: 68px;
    width: auto;
    max-height: calc(100dvh - 84px);
  }
  .promo-grid {
    grid-template-columns: 1fr !important;
  }
}


/* === ROUND 2 THAI BEAUTY HERO & LIVE SUPPORT CHAT === */
body.theme-1688-vip .hero-slider-card {
  background-image: linear-gradient(90deg, rgba(7, 7, 11, 0.94) 0%, rgba(10, 9, 15, 0.76) 46%, rgba(10, 9, 15, 0.14) 100%), url('../assets/hero-thai-beauty.jpg?v=20261116b') !important;
  background-size: cover !important;
  background-position: right top !important;
  background-repeat: no-repeat !important;
  border: 1px solid var(--border-gold) !important;
}
body.theme-1688-vip .hero-bg-overlay {
  background: radial-gradient(circle at 18% 50%, rgba(212, 175, 55, 0.12), transparent 65%) !important;
}
body.theme-1688-vip .hero-decor-art {
  display: none !important;
}
@media (max-width: 768px) {
  body.theme-1688-vip .hero-slider-card {
    background-image: linear-gradient(90deg, rgba(7, 7, 11, 0.92) 0%, rgba(10, 9, 15, 0.78) 55%, rgba(10, 9, 15, 0.28) 100%), url('../assets/hero-thai-beauty.jpg?v=20261116b') !important;
    background-position: 78% top !important;
  }
}

.ai-fab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.8);
}

.ai-msg-admin {
  border-color: var(--gold-primary) !important;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.18), rgba(20, 20, 28, 0.96)) !important;
}

.ai-admin-sender {
  font-size: 11px;
  font-weight: 800;
  color: var(--gold-primary);
  margin-bottom: 4px;
}

/* === PC & MOBILE CROSS-VIEWPORT / SAFE-AREA ALIGNMENT === */
html, body {
  max-width: 100%;
  overflow-x: clip;
}
@media (max-width: 480px) {
  .top-bar {
    padding: max(6px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) 6px max(10px, env(safe-area-inset-left));
    gap: 8px;
  }
  .main-header {
    padding: 10px max(10px, env(safe-area-inset-right)) 10px max(10px, env(safe-area-inset-left));
    gap: 10px;
  }
  .header-actions {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
  }
  .wallet-badge {
    min-width: 0;
    flex: 1 1 auto;
  }
  .app-container, .sports-container {
    padding-left: max(10px, env(safe-area-inset-left));
    padding-right: max(10px, env(safe-area-inset-right));
  }
  .bet-drawer {
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }
}
@media (min-width: 769px) and (max-width: 1024px) {
  .main-nav {
    flex-wrap: wrap;
    gap: 6px;
  }
  .venue-wallet-grid, .rebate-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
