/* mobile notice overflow fix - 2026-06-22 */

/* 全局禁止页面横向溢出 */
html,
body,
#app {
  width: 100% !important;
  max-width: 100vw !important;
  overflow-x: hidden !important;
}

* {
  box-sizing: border-box !important;
}

/* 常见首页容器，防止被内容撑宽 */
body > div,
#app > div {
  max-width: 100vw !important;
  overflow-x: hidden !important;
}

/* 修复公告栏区域：防止“更多”被顶到屏幕外 */
[class*="notice"],
[class*="Notice"],
[class*="notice"] *,
[class*="Notice"] * {
  box-sizing: border-box !important;
}

/* 公告整体不允许超过手机宽度 */
[class*="notice"],
[class*="Notice"] {
  max-width: 100vw !important;
}

/* 公告中间文字区域允许收缩 */
[class*="notice"] > *,
[class*="Notice"] > * {
  min-width: 0 !important;
}

/* 公告文本超出隐藏，不把右侧按钮挤飞 */
[class*="notice"] span,
[class*="Notice"] span,
[class*="notice"] div,
[class*="Notice"] div {
  max-width: 100% !important;
}

/* 右侧“更多”按钮尽量固定在可视区域内 */
[class*="more"],
[class*="More"] {
  flex-shrink: 0 !important;
  white-space: nowrap !important;
  z-index: 30 !important;
}

/* 移动端进一步收紧 */
@media screen and (max-width: 768px) {
  html,
  body,
  #app {
    width: 100vw !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  img,
  video,
  canvas {
    max-width: 100% !important;
  }

  [class*="notice"],
  [class*="Notice"] {
    width: 100% !important;
    max-width: 100vw !important;
    overflow: hidden !important;
  }
}

/* fix more button text horizontal - 2026-06-22 */
@media screen and (max-width: 768px) {
  [class*="more"],
  [class*="More"],
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
    white-space: nowrap !important;
    word-break: keep-all !important;
    overflow: hidden !important;
    text-overflow: clip !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 48px !important;
    width: 58px !important;
    height: 28px !important;
    line-height: 28px !important;
    flex-shrink: 0 !important;
    letter-spacing: 0 !important;
    font-size: 14px !important;
  }
}

/* only home notice more button fix - 2026-06-22 */
@media screen and (max-width: 768px) {
  .notice-box .go-btn {
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
    white-space: nowrap !important;
    word-break: keep-all !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 58px !important;
    min-width: 58px !important;
    height: 28px !important;
    line-height: 28px !important;
    font-size: 14px !important;
    letter-spacing: 0 !important;
    flex-shrink: 0 !important;
    overflow: hidden !important;
  }
}

/* final home notice more button width fix - 2026-06-22 */
@media screen and (max-width: 768px) {
  .notice-box .notice-content {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 100vw !important;
    overflow: hidden !important;
  }

  .notice-box .notice-left {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }

  .notice-box .go-btn {
    flex: 0 0 82px !important;
    width: 82px !important;
    min-width: 82px !important;
    max-width: 82px !important;
    height: 32px !important;
    line-height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
    white-space: nowrap !important;
    word-break: keep-all !important;
    overflow: visible !important;
    font-size: 15px !important;
    letter-spacing: 0 !important;
    padding: 0 !important;
    margin-left: 4px !important;
    text-align: center !important;
    position: relative !important;
    z-index: 30 !important;
  }
}
