/* ============================================================================
   pages/odds.css · 赔率异动页（#/odds）
   ----------------------------------------------------------------------------
   结构：.odds-page > .oa-head + [data-oa-body] > .oa-grid > .oa-cell × N
   约束：只用 tokens（无新增色值）；390 基准 / 320 不破版；暗/亮双主题；
        两列网格，一屏≈16 格；每格左侧 3px 等级色条（high=danger / mid=warn）；
        high 卡 1px 暖红描边 + 轻光晕；右上「高/中」小胶囊（10px）。
   ========================================================================== */

.odds-page { gap: 10px; }

/* ------------------------------ 页头（紧凑：不抢首屏格子） ------------------------------ */
.oa-head {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 40px;
  padding-left: 2px;
}
.oa-head-main { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; flex: 1; min-width: 0; }
.oa-head-row { display: flex; align-items: baseline; gap: 8px; width: 100%; min-width: 0; }
.oa-head-t { flex: none; font-size: var(--fs-15); font-weight: var(--fw-semibold); letter-spacing: .01em; color: var(--txt-0); }
.oa-head-s {
  min-width: 0;
  font-size: var(--fs-11);
  color: var(--txt-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}
/* 第二行：高 X · 中 Y（等级分布；无数据时隐藏） */
.oa-head-s2 {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  line-height: 1.3;
  color: var(--txt-2);
  font-variant-numeric: tabular-nums;
}
.oa-head-s2[hidden] { display: none; }
.oa-lv-dot { flex: none; width: 5px; height: 5px; border-radius: 50%; }
.oa-lv-dot--high { background: var(--danger); }
.oa-lv-dot--mid { background: var(--warn); }
.oa-lv-n { font-weight: var(--fw-semibold); }
.oa-lv-n--high { color: var(--danger); }
.oa-lv-n--mid { color: var(--warn); }
.oa-lv-sep { color: var(--txt-3); }
.oa-refresh {
  flex: none;
  width: 44px;
  height: 44px;
  margin-right: -6px;
  border-radius: 50%;
  color: var(--txt-1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.oa-refresh svg { width: 18px; height: 18px; }
.oa-refresh.is-busy svg { animation: spin 1s linear infinite; }
.oa-refresh:disabled { opacity: .5; }

/* ------------------------------ 两列网格 ------------------------------ */
.oa-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.oa-cell {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1px;
  width: 100%;
  min-width: 0;
  min-height: 68px;
  padding: 5px 7px 5px 10px;
  text-align: left;
  border-radius: var(--r-md);
  background: var(--surface-1);
  border: 1px solid var(--line-1);
  color: var(--txt-1);
  overflow: hidden;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--dur-1) var(--ease-out), border-color var(--dur-1) var(--ease-out);
}
.oa-cell:active { transform: scale(.985); }
/* high：1px 暖红描边 + 轻光晕（等级一眼可分） */
.oa-cell[data-level="high"] {
  border-color: var(--danger-line);
  box-shadow: 0 0 12px var(--danger-soft);
}
/* 左侧 3px 等级色条：high=危险色（需要更快判断）/ mid=警示色 */
.oa-cell::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: var(--warn);
}
.oa-cell[data-level="high"]::before { background: var(--danger); box-shadow: 0 0 8px var(--danger-soft); }

.oa-top { display: flex; align-items: baseline; gap: 5px; min-width: 0; line-height: 1.2; }
.oa-num { flex: none; font-size: 10px; font-weight: var(--fw-semibold); letter-spacing: .03em; color: var(--brand-text); }
.oa-lg {
  min-width: 0;
  font-size: 10px;
  color: var(--txt-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* 右上等级小胶囊：高=暖红底白字 / 中=暖色描边（10px，不新增行） */
.oa-lv {
  flex: none;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 14px;
  padding: 0 4px;
  margin-left: auto;
  border-radius: 4px;
  font-size: 10px;
  font-weight: var(--fw-bold);
  line-height: 1;
  letter-spacing: 0;
}
.oa-lv--high { background: var(--danger); color: #fff; box-shadow: 0 0 6px var(--danger-soft); }
.oa-lv--mid { background: var(--warn-soft); color: var(--warn); border: 1px solid var(--warn-line); }

.oa-teams { display: flex; align-items: baseline; gap: 4px; min-width: 0; line-height: 1.2; }
.oa-h, .oa-a {
  flex: 1;
  min-width: 0;
  font-size: var(--fs-13);
  font-weight: var(--fw-semibold);
  color: var(--txt-0);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.oa-a { text-align: right; }
.oa-vs { flex: none; font-size: 9px; letter-spacing: .04em; color: var(--txt-3); text-transform: uppercase; }

.oa-odds {
  display: flex;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
  font-size: var(--fs-12);
  line-height: 1.2;
  white-space: nowrap;
}
.oa-from { color: var(--txt-2); }
.oa-arrow { color: var(--txt-3); font-size: 10px; }
.oa-to { color: var(--txt-0); font-weight: var(--fw-semibold); }
.oa-pct {
  margin-left: auto;
  padding-left: 4px;
  font-size: var(--fs-11);
  font-weight: var(--fw-semibold);
  font-variant-numeric: tabular-nums;
}
.oa-pct.up { color: var(--data-up); }
.oa-pct.down { color: var(--data-down); }
.oa-line-txt {
  min-width: 0;
  font-size: var(--fs-12);
  font-weight: var(--fw-semibold);
  color: var(--txt-0);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.oa-foot {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  margin-top: 1px;
  font-size: 10px;
  line-height: 1.2;
  color: var(--txt-2);
  white-space: nowrap;
  overflow: hidden;
}
.oa-src {
  flex: none;
  padding: 0 4px;
  border-radius: 3px;
  background: var(--surface-2);
  color: var(--txt-2);
  font-size: 10px;
  line-height: 14px;
}
.oa-line { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.oa-kick { color: var(--aurora-teal); overflow: hidden; text-overflow: ellipsis; }

/* 骨架 */
.oa-cell--sk { justify-content: center; gap: 8px; cursor: default; }
.oa-cell--sk::before { display: none; }

/* 页脚说明 / 空态 / 阈值说明 */
.oa-actions { display: flex; margin-top: var(--s-2); }
.oa-actions .btn { flex: none; }
.oa-foot-note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 2px 0 0;
  padding: 0 2px;
  font-size: 10px;
  line-height: 1.5;
  color: var(--txt-3);
}
.oa-foot-note svg { width: 13px; height: 13px; flex: none; margin-top: 1px; }
.oa-empty { margin-top: 4px; }
.oa-empty-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: var(--s-3);
  font-size: var(--fs-11);
  color: var(--txt-3);
}
.oa-empty-foot svg { width: 14px; height: 14px; flex: none; color: var(--txt-2); }

.oa-rules {
  margin-top: var(--s-3);
  padding: 12px;
  border: 1px solid var(--line-1);
  border-radius: var(--r-md);
  background: var(--surface-1);
}
.oa-rules-h {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-12);
  font-weight: var(--fw-semibold);
  color: var(--txt-1);
}
.oa-rules-h svg { width: 14px; height: 14px; flex: none; color: var(--brand-text); }
.oa-rules ul { margin: 8px 0 0; padding-left: 18px; font-size: var(--fs-11); line-height: 1.65; color: var(--txt-2); }
.oa-rules li + li { margin-top: 2px; }
.oa-rules-foot { margin-top: 8px; font-size: 10px; line-height: 1.5; color: var(--txt-3); }

/* 320：源标签让位给盘口文案；隐藏 vs、队名降到 12px，保证「主客」可读 */
@media (max-width: 340px) {
  .oa-src { display: none; }
  .oa-cell { padding-right: 7px; }
  .oa-head-s { font-size: 10px; }
  .oa-vs { display: none; }
  .oa-h, .oa-a { font-size: var(--fs-12); }
}
