﻿/* mobile harden 20260828 — Tencent TDesign mobile baseline */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}
img,
video,
canvas,
svg {
  max-width: 100%;
  height: auto;
}

.safe-bottom {
  padding-bottom: calc(3.75rem + env(safe-area-inset-bottom));
}
@media (min-width: 768px) {
  .safe-bottom {
    padding-bottom: 0;
  }
}

/* 底部 Tab 栏（腾讯风格） */
.ac-mobile-tabbar {
  display: none;
}
@media (max-width: 767px) {
  .ac-mobile-tabbar {
    display: grid;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    grid-template-columns: repeat(var(--tab-cols, 4), 1fr);
    padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid #e7e7e7;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.04);
  }
  .ac-mobile-tabbar a,
  .ac-mobile-tabbar button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 50px;
    padding: 6px 4px;
    font-size: 10px;
    font-weight: 600;
    color: #646a73;
    text-decoration: none;
    background: transparent;
    border: 0;
    cursor: pointer;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
  }
  .ac-mobile-tabbar a.is-active,
  .ac-mobile-tabbar button.is-active {
    color: #0052d9;
  }
  .ac-mobile-tabbar svg {
    width: 22px;
    height: 22px;
  }
}

@media (max-width: 768px) {
  .container,
  .ac-container,
  main,
  .page-wrap,
  #root > div {
    max-width: 100% !important;
  }
  table {
    display: block;
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
  }
  h1,
  h2,
  h3,
  p,
  a {
    word-break: break-word;
    overflow-wrap: anywhere;
  }
  .ecosystem-mega-menu,
  .eco-mega,
  .ac-ecosystem-strip {
    max-width: 100vw !important;
    overflow: hidden !important;
  }
  header,
  .sticky,
  .ac-header {
    max-width: 100vw;
  }
  input:not([type='checkbox']):not([type='radio']),
  select,
  textarea,
  button {
    font-size: 16px !important;
  }
  pre,
  code {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}
