/* 开奖直播页（/Live）。只有这一个页面会加载本文件。 */
.lv-page, .lv-page *, .lv-page *::before, .lv-page *::after,
.lv-mhead, .lv-mhead *,
.lv-picker, .lv-picker *, .lv-picker *::before, .lv-picker *::after { box-sizing: border-box; }

.lv-page { margin-top: 15px; color: rgba(0, 0, 0, .88); font-size: 14px; line-height: 22px; text-align: left; }
.lv-page button, .lv-page select { font-family: inherit; outline: 0; -webkit-tap-highlight-color: transparent; }
.lv-page button { -webkit-appearance: none; appearance: none; }
.lv-mhead, .lv-live-title .lv-m, .lv-pick, .lv-picker { display: none; }

/* ---------- 上半部分：播放器 + 往期回顾 ---------- */
.lv-top { display: flex; align-items: stretch; }
.lv-live { flex: 0 0 640px; width: 640px; margin-right: 20px; padding: 0 20px 20px; background: #fff; border-radius: 3px; }
.lv-live-title { display: flex; align-items: center; justify-content: space-between; padding: 15px 0; font-size: 18px; line-height: 28px; }
.lv-live-title em { color: #ec6337; font-style: normal; }
.lv-video { position: relative; width: 100%; height: 385px; background: #eee; overflow: hidden; }
.lv-video iframe { position: absolute; left: 0; top: 0; width: 100%; height: 100%; border: 0; display: block; }

.lv-periods { flex: 1 1 0; min-width: 0; padding: 0 20px; background: #fff; border-radius: 3px; }
.lv-periods-head { display: flex; align-items: center; justify-content: space-between; height: 63px; border-bottom: 1px solid #eee; font-size: 16px; line-height: 25px; }
.lv-select { position: relative; }
.lv-select select { display: block; width: 102px; height: 32px; margin: 0; padding: 0 28px 0 11px; border: 1px solid #d9d9d9; border-radius: 6px; background: #fff; color: rgba(0, 0, 0, .88); font-size: 14px; line-height: 30px; cursor: pointer; -webkit-appearance: none; -moz-appearance: none; appearance: none; transition: border-color .2s, box-shadow .2s; }
.lv-select select::-ms-expand { display: none; }
.lv-select::after { content: ""; position: absolute; right: 12px; top: 50%; width: 7px; height: 7px; margin-top: -6px; border-right: 1.5px solid rgba(0, 0, 0, .3); border-bottom: 1.5px solid rgba(0, 0, 0, .3); transform: rotate(45deg); pointer-events: none; }
.lv-select select:hover { border-color: #f98a5e; }
.lv-select select:focus { border-color: #ec6337; box-shadow: 0 0 0 2px rgba(236, 99, 55, .12); }
.lv-periods-body { height: 400px; overflow-x: hidden; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #b9b9b9 transparent; }
.lv-periods-body::-webkit-scrollbar { width: 6px; }
.lv-periods-body::-webkit-scrollbar-thumb { background: #b9b9b9; border-radius: 3px; }
.lv-periods-list { display: flex; flex-wrap: wrap; margin-right: -10px; padding-top: 15px; transition: opacity .15s; }
.lv-periods-list.loading { opacity: .45; pointer-events: none; }
.lv-p-item { flex: 0 0 20%; max-width: 20%; padding: 0 10px 10px 0; }
.lv-btn { display: block; width: 100%; height: 32px; margin: 0; padding: 0; border: 1px solid #d9d9d9; border-radius: 6px; background: #fff; color: rgba(0, 0, 0, .88); font-size: 14px; line-height: 30px; text-align: center; white-space: nowrap; cursor: pointer; box-shadow: 0 2px 0 rgba(0, 0, 0, .02); transition: color .2s, border-color .2s, background-color .2s; }
.lv-btn:hover { color: #f98a5e; border-color: #f98a5e; }
.lv-btn.on, .lv-btn.on:hover { background: #ec6337; border-color: #ec6337; color: #fff; box-shadow: 0 2px 0 rgba(255, 105, 5, .06); }

/* ---------- 手机版 ---------- */
@media (max-width: 768px) {
    /* --u：以 375 宽为基准的缩放单位，整页随屏幕宽度等比放大（上限 540 宽） */
    body { --u: calc(100vw / 375); display: flex; flex-direction: column; }
    @supports (width: min(1px, 2px)) { body { --u: calc(min(100vw, 540px) / 375); } }
    body > * { flex: 0 0 auto; }

    /* 手机版保留 logo 栏（和其它页面一样），橙色标题栏放在 logo 下面；右上角三条杠也和其它页面一样（深色，在 logo 栏里） */
    body .NoticeBox { margin-top: 0; }

    .lv-mhead { display: block; position: relative; height: calc(51.5 * var(--u)); background: linear-gradient(#fe6528, #e74409); }
    /* 橙色标题栏只当横幅：去掉左边的返回按钮，只留中间的文字 */
    .lv-back { display: none; }
    .lv-mtitle { padding: 0 calc(15 * var(--u)); color: #fff; font-size: calc(17 * var(--u)); line-height: calc(51.5 * var(--u)); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

    .lv-page { margin-top: 0; font-size: calc(14 * var(--u)); line-height: calc(22 * var(--u)); }
    .lv-top { display: block; }
    .lv-live { width: auto; margin: 0; padding: 0 calc(15 * var(--u)) calc(15 * var(--u)); border-radius: 0; }
    .lv-live-title { padding: calc(10 * var(--u)) 0; font-size: calc(18 * var(--u)); line-height: calc(28.3 * var(--u)); }
    .lv-live-title .lv-pc { display: none; }
    .lv-live-title .lv-m { display: inline; }
    .lv-pick { display: flex; align-items: center; height: calc(32 * var(--u)); margin: 0; padding: calc(4 * var(--u)) calc(8 * var(--u)); border: 1px solid #d5d5d5; border-radius: calc(6 * var(--u)); background: #fff; color: #999; font-size: calc(14 * var(--u)); line-height: calc(22 * var(--u)); white-space: nowrap; box-shadow: 0 2px 0 rgba(0, 0, 0, .02); cursor: pointer; }
    .lv-pick svg { display: block; width: calc(14 * var(--u)); height: calc(14 * var(--u)); margin-left: calc(8 * var(--u)); fill: currentColor; }
    .lv-pick.on { border-color: #ec6337; color: rgba(0, 0, 0, .88); }
    .lv-video { height: 0; padding-top: 65.16%; }          /* 345 : 225，高度跟着宽度走 */
    .lv-periods { display: none; }

    /* 开奖期数选择器：底部弹出，两列滚轮 */
    .lv-picker.show { display: block; position: fixed; left: 0; top: 0; right: 0; bottom: 0; z-index: 1000; }
    .lv-pk-mask { position: absolute; left: 0; top: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, .55); animation: lvFade .2s ease-out; }
    .lv-pk-body { position: absolute; left: 0; right: 0; bottom: 0; padding-bottom: env(safe-area-inset-bottom); background: #fff; border-radius: 8px 8px 0 0; animation: lvUp .22s ease-out; }
    .lv-pk-hd { display: flex; align-items: center; justify-content: space-between; height: 42px; padding: 0 4px; border-bottom: 1px solid #eee; }
    .lv-pk-hd a { padding: 8px; color: #ec6337; font-size: 15px; line-height: 26px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
    .lv-pk-view { position: relative; display: flex; height: 208px; overflow: hidden; }
    .lv-pk-col { flex: 1 1 0; min-width: 0; height: 100%; padding: 87px 0; overflow-x: hidden; overflow-y: auto; text-align: center; scroll-snap-type: y mandatory; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; scrollbar-width: none; }
    .lv-pk-col::-webkit-scrollbar { display: none; }
    .lv-pk-item { height: 34px; color: #333; font-size: 16px; line-height: 34px; white-space: nowrap; overflow: hidden; scroll-snap-align: center; }
    .lv-pk-shade { position: absolute; left: 0; top: 0; right: 0; bottom: 0; pointer-events: none; background: linear-gradient(rgba(255, 255, 255, .95), rgba(255, 255, 255, .6) 41.8%, rgba(255, 255, 255, 0) 41.8%, rgba(255, 255, 255, 0) 58.2%, rgba(255, 255, 255, .6) 58.2%, rgba(255, 255, 255, .95)); }
    .lv-pk-shade::before { content: ""; position: absolute; left: 0; right: 0; top: 87px; height: 34px; border-top: 1px solid #eee; border-bottom: 1px solid #eee; }
    html.lv-lock, html.lv-lock body { overflow: hidden; }
}
@keyframes lvUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes lvFade { from { opacity: 0; } to { opacity: 1; } }
