/*
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}*/

  /* .barrier-free::before,
  .barrier-free::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  } */
  
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  overflow-x: hidden;
  /* 禁止父级有任何transform，避免坐标系冲突 */
  transform: none !important;
  transform-origin: top left !important;
}
  
/* 确保面板不会被遮挡 */
.barrier-free {
  position: fixed !important;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none; /* 不影响页面交互 */
  z-index: 9999 !important;
}

.barrier-free > * {
  pointer-events: auto; /* 恢复子元素交互 */
}

#assistBtn, #assistPanel {
  position: fixed;
  z-index: 9999;
}


  /* 主悬浮按钮：红色正圆 */
  #assistBtn {
      /* --- 在按钮内部定义变量 --- */
      --btn-local-font-size: 4vmin; 
      /* 新增：按钮宽度 */
      --btn-local-width: 24vmin;    /*18*/
      /* 新增：按钮高度 */
      --btn-local-height: 12vmin;   
      /* --- 使用本地变量设置按钮样式 --- */
      position: fixed;
      z-index: 9999;
      right: 1rem; 
      bottom: 3rem;
      width: var( --btn-local-width);
      height: var(--btn-local-height);
      border-radius: 999px;
      background: #f44336;
      box-shadow: 0 calc(0.15 * var(--btn-local-height)) calc(0.3 * var(--btn-local-height)) rgba(0, 0, 0, .25); /* 阴影也基于高度 */
      cursor: pointer;
      transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
      visibility: visible;
      opacity: 1;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 0;
      box-sizing: border-box;
      /* 设置按钮自身的字体大小，内部元素可以相对它使用 em */
      font-size: var(--btn-local-font-size)
  }
  
  #assistBtn.hidden {
      visibility: hidden;
      opacity: 0;
      pointer-events: none;
  }
  
  /* 按钮内部文字样式 */
  .btn-text {
      color: #fff;
      /* 使用 em 相对于按钮的 font-size (--local-base-font-size) */
      font-size: 1em; 
      white-space: nowrap;
      text-align: center;
      /* 关键：允许文字在 flex 容器中收缩 */
      flex-shrink: 1; 
      /* 不放大 */
      flex-grow: 0;   
      /* 基础宽度为内容宽度 */
      flex-basis: auto; 
      /* 关键：限制文字的最大宽度为容器的大部分 */
      max-width: 100%; 
      overflow: hidden;
      text-overflow: ellipsis; /*作为后备可以保留 */
      padding: 0 0.4em;
      /* 关键：确保 padding 也被计算在 width 内 */
      box-sizing: border-box; 
      /* 强制文字在一行内显示 */
      display: block;
  }
  
  
  /* 展开的功能条：红底长圆 */
  #assistPanel {
      /* --- 在面板内部也定义一遍相同的变量 --- */
      /* 基础值 (xs) */
      --panel-local-font-size: 4.8vmin;
      --panel-local-btn-size: 9vmin; /* 用于计算面板高度和圆角 */
  
      position: fixed;
      z-index: 9999;
      right: 1rem; /* 1rem 仍然是浏览器默认或页面其他地方设置的值 */
      bottom: 1rem;
      border-radius: calc(var(--panel-local-btn-size) / 2);
      background: #f44336;
      box-shadow: 0 calc(0.15 * var(--panel-local-btn-size)) calc(0.4 * var(--panel-local-btn-size)) rgba(0, 0, 0, .2);
      display: flex;
      align-items: center;
      padding: 0 calc(var(--panel-local-font-size) * 1); 
      opacity: 0;
      pointer-events: none;
      transform: scale(1);
      transform-origin: right bottom;
      transition: all .3s ease;
      min-height: var(--panel-local-btn-size);
      /* 设置面板自身的字体大小，内部元素可以相对它使用 em */
      font-size: var(--panel-local-font-size);
  }
  
  #assistPanel.show {
      opacity: 1;
      pointer-events: auto;
      transform: scale(1);
  }
  
  /* 功能按钮：白字 */
  #assistPanel button {
      flex: 1 1 0;
      margin: 0 calc(var(--panel-local-font-size) * 0.2); 
      padding: 0.5em 0.6em; /* em 相对于按钮自身的 font-size */
      border: none;
      border-radius: 2em;
      background: transparent;
      font-size: 1em; /* 1em = #assistPanel 的 font-size */
      color: #fff;
      cursor: pointer;
      white-space: nowrap;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 0.25em; /* em 相对于按钮自身的 font-size */
  }
  
  #assistPanel button:active {
      background: rgba(255, 255, 255, .2);
  }
  
  #assistPanel button img {
      width: 1.5em; /* em 相对于按钮自身的 font-size */
      height: 1.5em;
      object-fit: contain;
  }
  
  /* 正文样式 (用于测试) */
  .content-placeholder {
    margin: 2rem 1rem;
    line-height: 1.6;
  }
  .content-placeholder h2 {
    margin-bottom: 1rem;
    font-size: 1.2em;
  }
  .cont {
  transition: transform .2s;  
}
   .navigation {
  transition: transform .2s;  
}
  
  
  
  
  
  