/* --- VocabModule 独立命名空间样式 (vm-) --- */

/* 1. 基础容器 */
.vm-outer-wrapper {
    width: 100%;
    flex: 1;
    overflow: visible;
    margin-left: 0;
    margin-right: 0;
    margin-top: 0px;
    background-color: #fafafa;
}

.vm-scroll-viewport {
    box-sizing: border-box;
    height: 100%;
    width: 100%;
    overflow-y: visible;
    overflow-x: hidden;
    padding-top: 50px;
    padding-left: 2.5rem;
    padding-right: 0;
    padding-bottom: 2.5rem;
    background-color: #fafafa;
    position: relative; /* 为广告栏提供定位基准 */
}

/* 竖向广告栏：顶边贴二级导航下分割线、右边贴页面右边缘；
   sticky+float 使滚动时粘在滚动区顶沿，负 margin 抵消滚动视口顶 padding */
.vm-ad-sidebar {
    position: sticky;
    top: 0;
    float: right;
    margin-top: -50px;
    width: 160px;
    height: 600px;
    z-index: 10;
    pointer-events: auto;
}

/* 横幅广告栏：靠近屏幕右侧 */
.vm-bottom-banner-ad {
    width: 100%;
    padding-left: 0.25rem;
    padding-right: 2.5rem;
}

.vm-bottom-banner-ad .banner-ad-content {
    max-width: 800px;
    margin-left: 0;
    margin-right: 0;
}

/* 2. 布局容器 */
.vm-layout-flex-container {
    display: flex;
    max-width: 672px;
    margin: 0;

    flex-direction: column;
    gap: 31px;
    min-height: min-content;
}

/* 3. 内容列 */
.vm-content-column {
    width: 100%;
}

/* 单词块容器 */
.vm-word-block { margin-bottom: 70px; }

/* 4. 数字标号样式
.vm-label-number {
    font-family: "Monaco", monospace;
    font-weight: bold;
    color: #444;
    font-size: 12px !important;
}*/

/* 6. 条目内容布局 - 文字容器 */
.vm-item-text-info {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  line-height: 1;
  flex: 1;          /* 核心：占据剩余空间 */
  min-width: 0;     /* 核心：允许容器在 Flex 中收缩 */
}

/* 7. 意义信息 - 词意容器 */
.vm-item-meaning-info {
    margin-top: 3px;
    position: relative;
    left: -23px;     /*向左平移，与上方对齐 */
    width: 100%;     /*核心：强制撑满父容器宽度，防止提前换行*/
}

/* 2. 词意文字：解决提前换行 */
.vm-item-meaning-text {
  display: inline;         /* 保持行内显示 */
  white-space: nowrap;     /* 【关键】强制不换行，直到触碰到容器边缘 */
  /* 如果你希望超长时才换行，而不是强制不换，请改用下面两行： */
  /* white-space: normal; */
  /* flex: 1; */

  color: #444;             /* 稍微加深颜色，提高可读性 */
  margin-left: 5px;        /* 与词性标签留出间距 */
}

.vm-meaning-text {
    margin-top: -6px;
    font-size: 0.95rem;
    margin-left: 10px;
    color: #666;
    line-height: 1.4;
}

.vm-word-block:last-child { margin-bottom: 100; }

.vm-main-card {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    /*background: transparent;*/
    position: relative;
    background: white;       /* 背景色给到具体的单词块 */
    border-radius: 0.5rem;
    transform: translateX(-2px);
}

.vm-card-body {
    position: relative;
    padding-top: 16px;
    padding-bottom: 28px;
    overflow: visible;
    background: transparent;
    border-radius: 0;
}

/* 4. 虚线分隔符 */
.vm-vertical-divider {
    position: absolute;
    left: 50%;
    top: 20px;
    bottom: 20px;
    border-left: 1px dashed #e2e8f0;
    transform: translateX(-50%);
    z-index: 1;
}

/* 5. 单词网格 (双栏) */
.vm-words-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.vm-word-cell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2px 32px 2px 14px;
}

/* 斑马纹背景 - 每个单元格独立计算，每行 2 个共享背景 */
.vm-bg-stripe {
    background-color: #f3f4f6;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

/* 6. 条目内容布局 */
.vm-item-inner {
    width: 100%;
    padding-top: 2px !important;
    padding-left: 6px !important;
    padding-bottom: 2px !important;
    display: flex;
    align-items: flex-end;
    min-height: auto;
}

/* 包裹 01 | ゼロ の那一层 */
.vm-item-index-section {
  display: flex;
  align-items: flex-end;
  gap: 0;
  height: 2rem;
  margin-left: -6px;
}

/* 数字标识 01 */
.vm-label-number {
  font-weight: 900;
  color: #b0b0b0;
  font-size: 15px;
  font-family: "Monaco", monospace;
  align-self: flex-end;
  padding-bottom: 0px;

  margin-bottom: 26px;
}

/* 注音假名 */
.vm-kana-ruby {
  font-size: 11px;
  font-weight: 600;
  color: #888;
  margin-bottom: 2px;
  transform: translateY(1px);
  line-height: 1;
  display: block;
}

.vm-kanji-bold {
  font-size: 16px;
  font-weight: 800;
  color: #333;
  margin: 0;
  line-height: 1;
  transform: translateY(-1px);
}

/* 竖线：精准匹配文字高度 */
.vm-label-divider {
  display: inline-block;
  width: 2px;
  background-color: #6a6a6a;
  margin: 0 9px;
  color: transparent;
  overflow: hidden;
  height: 22px;

    position: relative;
    top: -28px;
    vertical-align: bottom;

    line-height: 1;
    overflow: hidden;
}

.vm-pos-tag {
    font-size: 14px !important;
    font-weight: 700;
    color: #777;
    white-space: nowrap; /* 强制不换行，防止 (Kata 和 bilangan) 分开 */
}

/* 7. 意义信息 */
.vm-item-meaning-text {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.4;
    margin-left: 0 !important;
    padding-left: 0 !important;
}

/* 8. 播放按钮 */
.vm-play-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    transition: 0.2s;
    margin-left: auto;
    margin-right: 16px;
    position: relative;
    top: -26px;
    left: 44px;
}
.vm-play-btn:hover {
    color: #dc2626;
}
.vm-icon-svg {
    width: 24px;
    height: 24px;
}

/* 9. 红色标签 */
.vm-badge-pos {
    position: absolute;
    top: -12px;
    left: 1.5rem;
    z-index: 20;
}
.vm-badge-red {
    background-color: #dc2626;
    color: white;
    padding: 3px 12px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* 1. 悬浮包装层：建立定位基准 */
.vm-title-tooltip-wrapper {
    position: relative;
    display: inline-block;
    cursor: help; /* 鼠标变为问号提示 */
}

/* 2. 描述提示框：初始状态隐藏 */
.vm-title-tooltip-box {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    z-index: 999;          /* 确保浮在最上层 */
    top: 130%;             /* 在标签下方弹出 */
    left: 0;
    width: 280px;          /* 描述文字多，给足宽度 */
    background-color: rgba(51, 51, 51, 0.95); /* 深色背景，与列表形成对比 */
    color: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.5;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: opacity 0.3s, transform 0.3s;
    transform: translateY(-8px); /* 向上滑出的动画感 */
    pointer-events: none;        /* 避免鼠标滑入提示框引起闪烁 */
}

/* 3. 悬停触发显示 */
.vm-title-tooltip-wrapper:hover .vm-title-tooltip-box {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

/* 4. 装饰：小箭头 */
.vm-title-tooltip-box::after {
    content: "";
    position: absolute;
    bottom: 100%;       /* 箭头向上 */
    left: 20px;
    border-width: 6px;
    border-style: solid;
    border-color: transparent transparent rgba(51, 51, 51, 0.95) transparent;
}
