/* ============================================================
   中签数据页样式（lottery-data.html）
   ============================================================ */

/* ---------- 顶部导航 ---------- */
.ld-topbar {
    background: #fff;
    border-bottom: 1px solid #f3f4f6;
    padding: 14px 16px;
}
.ld-topbar-inner {
    max-width: 1024px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px;
}
.ld-back {
    width: 40px; height: 40px; border-radius: 50%;
    background: #f9fafb; color: #6b7280;
    display: flex; align-items: center; justify-content: center;
    text-decoration: none;
    transition: background .2s;
    flex-shrink: 0;
}
.ld-back:hover { background: #f3f4f6; }
.ld-title { font-size: 17px; font-weight: 900; color: #111827; margin: 0; }
.ld-rules-btn {
    font-size: 12px; color: #6366f1; font-weight: 700;
    padding: 5px 10px; border-radius: 10px;
    background: #eef2ff; text-decoration: none;
    display: inline-flex; align-items: center; gap: 5px;
    white-space: nowrap;
    transition: background .2s;
}
.ld-rules-btn:hover { background: #e0e7ff; color: #4f46e5; }

/* ---------- 列表容器 ---------- */
.ld-list { max-width: 1024px; margin: 0 auto; padding: 16px 12px 80px; }

/* ---------- 空态 ---------- */
.ld-empty {
    background: #fff; border-radius: 24px; padding: 48px 20px;
    text-align: center; border: 1px solid #f3f4f6;
}
.ld-empty-icon {
    width: 80px; height: 80px; border-radius: 50%;
    background: #f9fafb; color: #d1d5db;
    display: flex; align-items: center; justify-content: center;
    font-size: 30px; margin: 0 auto 16px;
}
.ld-empty p { color: #9ca3af; font-weight: 700; margin: 0; }

/* ---------- 卡片通用 ---------- */
.ld-card {
    position: relative; overflow: hidden;
    background: #fff;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid #f3f4f6;
    box-shadow: 0 1px 2px rgba(0,0,0,.03);
    text-decoration: none;
    display: block;
    transition: all .2s;
}
.ld-card:hover { border-color: #dbeafe; box-shadow: 0 6px 16px rgba(0,0,0,.07); }

/* 右上角斜标 */
.ld-ribbon {
    position: absolute; top: 0; right: 0;
    color: #fff; font-size: 12px; font-weight: 700;
    padding: 4px 16px;
    border-bottom-left-radius: 12px;
}
.ld-ribbon.amber { background: linear-gradient(to left, #fbbf24, #eab308); }
.ld-ribbon.orange { background: linear-gradient(to left, #fb923c, #f59e0b); }

.ld-card-row1 { display: flex; align-items: center; justify-content: space-between; margin: 8px 0 4px; gap: 10px; }
.ld-phase { font-size: 17px; font-weight: 700; color: #111827; margin: 0; }
.ld-card:hover .ld-phase { color: #1890ff; }
.ld-rate { color: #3b82f6; font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.ld-rate i.arrow { font-size: 10px; color: #d1d5db; transition: transform .2s; }
.ld-card:hover .ld-rate i.arrow { transform: translateX(3px); }
.ld-rate.muted { color: #9ca3af; font-weight: 700; }
.ld-card-row2 { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: #9ca3af; margin-bottom: 10px; gap: 10px; }

/* 统计网格 */
.ld-stats {
    background: rgba(249,250,251,.85);
    border-radius: 16px;
    padding: 12px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
}
.ld-stat { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.ld-stat .k { color: #6b7280; }
.ld-stat .v { font-weight: 700; color: #374151; }
.ld-stat .v.blue { color: #3b82f6; }
.ld-stat .v.red { color: #ef4444; }

/* ---------- 开放竞猜卡片 ---------- */
.ld-card.guess { background: #fefce8; border-color: #fef08a; }
.ld-card.guess:hover { border-color: #fde68a; box-shadow: 0 6px 16px rgba(0,0,0,.07); }

.ld-guess-divider { border-top: 1px solid rgba(0,0,0,.05); padding-top: 10px; margin-top: 4px; }
.ld-myguess { font-size: 14px; color: #6b7280; font-weight: 700; }
.ld-myguess b { color: #6366f1; }
.ld-tag {
    margin-left: 8px; padding: 2px 8px; border-radius: 8px;
    background: #f3f4f6; color: #9ca3af; font-size: 12px; font-weight: 500;
}
.ld-countdown { color: #f59e0b; font-weight: 700; font-size: 12px; margin-top: 5px; }
.ld-countdown.quota-line { color: #0ea5e9; margin-top: 4px; }
.ld-countdown.closed { color: #ef4444; }

.ld-guess-label { font-size: 14px; color: #6b7280; font-weight: 700; margin-bottom: 8px; }
.ld-guess-form { display: flex; flex-direction: column; gap: 12px; }
.ld-guess-input {
    width: 100%; padding: 12px 16px;
    border-radius: 12px; border: 1px solid #e5e7eb;
    font-size: 17px; font-weight: 700; color: #111827;
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
}
.ld-guess-input:focus { outline: none; border-color: #818cf8; box-shadow: 0 0 0 2px #e0e7ff; }
.ld-guess-hint { font-size: 12px; color: #9ca3af; margin-top: 6px; min-height: 18px; }
.ld-guess-hint strong { color: #6366f1; }
.ld-guess-actions { display: flex; flex-direction: row; gap: 12px; }
.ld-btn-guess {
    flex: 1; padding: 12px 0;
    background: #6366f1; color: #fff; font-weight: 700;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(99,102,241,.25);
    transition: all .15s; white-space: nowrap;
}
.ld-btn-guess:hover { background: #4f46e5; }
.ld-btn-guess:active { transform: scale(.96); }
.ld-btn-quota {
    flex: 1; padding: 12px 0;
    background: #38bdf8; color: #fff; font-weight: 700;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(56,189,248,.25);
    white-space: nowrap; cursor: default;
}

/* ---------- 封盘卡片 ---------- */
.ld-card.closed { border-color: #ffedd5; }

/* 未公布数据卡片：虚线边框、不可点击 */
.ld-card.unpublished { border-color: #e5e7eb; border-style: dashed; background: #fafafa; cursor: default; }
.ld-card.unpublished:hover { border-color: #e5e7eb; box-shadow: 0 1px 2px rgba(0,0,0,.03); }
.ld-pending-note {
    display: flex; align-items: center; gap: 6px;
    font-size: 13px; color: #9ca3af;
    background: #f3f4f6; border-radius: 10px; padding: 9px 12px;
}
.ld-lock-box {
    background: rgba(255,247,237,.7);
    border-radius: 16px; padding: 14px; margin-bottom: 12px;
    text-align: center;
}
.ld-lock-icon {
    width: 48px; height: 48px; border-radius: 50%;
    background: #ffedd5; color: #f97316;
    display: flex; align-items: center; justify-content: center;
    font-size: 19px; margin: 0 auto 8px;
}
.ld-lock-box .t1 { color: #c2410c; font-weight: 700; font-size: 15px; }
.ld-lock-box .t2 { color: #fb923c; font-size: 13px; margin-top: 3px; }

/* ---------- 竞猜下一期 / 查看上一期 CTA（双端并排） ---------- */
.ld-next-cta {
    display: flex; gap: 12px; justify-content: center;
    padding: 8px 0 16px; max-width: 560px; margin: 0 auto;
}
.ld-next-btn, .ld-prev-btn {
    flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 16px; font-weight: 700; border-radius: 16px;
    white-space: nowrap; transition: all .2s;
}
.ld-next-btn {
    background: linear-gradient(to right, #6366f1, #9333ea);
    color: #fff;
    box-shadow: 0 8px 18px rgba(99,102,241,.3);
}
.ld-next-btn:hover { transform: scale(1.04); box-shadow: 0 12px 24px rgba(99,102,241,.38); color: #fff; }
/* 下一期未开启：灰色禁用态，不可跳转 */
.ld-next-btn.disabled {
    background: #e5e7eb; color: #9ca3af;
    box-shadow: none; cursor: not-allowed;
}
.ld-next-btn.disabled:hover { transform: none; box-shadow: none; color: #9ca3af; }
.ld-prev-btn {
    background: #fff; color: #6366f1; border: 2px solid #e0e7ff;
}
.ld-prev-btn:hover { border-color: #6366f1; color: #4f46e5; transform: scale(1.04); }
@media (max-width: 480px) {
    .ld-next-cta { gap: 8px; }
    .ld-next-btn, .ld-prev-btn { padding: 11px 6px; font-size: 12px; gap: 5px; }
}

/* ---------- 详情视图 ---------- */
.ld-detail-wrap { max-width: 1024px; margin: 0 auto; padding: 20px 16px 80px; }
.ld-overview {
    background: #fff; border-radius: 24px; padding: 24px 16px;
    border: 1px solid #f3f4f6;
    display: grid; grid-template-columns: 1fr 1fr; gap: 22px 16px;
}
.ld-overview .item { text-align: center; }
.ld-overview .k { font-size: 12px; color: #9ca3af; font-weight: 700; margin-bottom: 4px; }
.ld-overview .v { font-size: 23px; font-weight: 900; color: #374151; }
.ld-overview .v.blue { color: #3b82f6; }

.ld-panel {
    background: #fff; border-radius: 24px; padding: 22px 20px;
    border: 1px solid #f3f4f6; margin-top: 14px;
}
.ld-panel h3 { font-size: 16px; font-weight: 900; color: #111827; display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.ld-panel h3 i { color: #3b82f6; }
.ld-chart-box { position: relative; height: 300px; width: 100%; }

.ld-daily-table { width: 100%; border-collapse: collapse; }
.ld-daily-table th {
    background: #f9fafb; color: #9ca3af; font-size: 11px; font-weight: 700;
    text-align: left; padding: 10px 16px;
}
.ld-daily-table td { padding: 11px 16px; border-bottom: 1px solid #f3f4f6; font-size: 14px; }
.ld-daily-table tr:last-child td { border-bottom: none; }
.ld-daily-table .date { font-weight: 700; color: #4b5563; }
.ld-daily-table .cnt { font-weight: 900; color: #2563eb; }

/* ---------- 弹窗通用 ---------- */
.ld-modal-mask {
    position: fixed; inset: 0; z-index: 9999;
    display: none; align-items: center; justify-content: center;
    background: rgba(0,0,0,.5);
    backdrop-filter: blur(4px);
    padding: 16px;
}
.ld-modal-mask.show { display: flex; }
.ld-modal {
    background: #fff; border-radius: 24px;
    width: 100%; max-width: 420px;
    max-height: 90vh; overflow-y: auto;
    padding: 24px;
    position: relative;
}
.ld-modal-mask.show .ld-modal { animation: ldPop .25s ease; }
@keyframes ldPop {
    from { transform: translateY(12px) scale(.96); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}
.ld-modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.ld-modal-head h3 { font-size: 18px; font-weight: 900; color: #111827; display: flex; align-items: center; gap: 8px; }
.ld-modal-head h3 .ic {
    width: 30px; height: 30px; border-radius: 50%;
    background: #e0e7ff; color: #6366f1;
    display: flex; align-items: center; justify-content: center; font-size: 13px;
}
.ld-modal-close { width: 32px; height: 32px; border-radius: 50%; color: #9ca3af; display: flex; align-items: center; justify-content: center; transition: background .2s; }
.ld-modal-close:hover { background: #f3f4f6; }

.ld-rules-block { background: #f9fafb; border-radius: 16px; padding: 16px; margin-bottom: 12px; }
.ld-rules-block h4 { font-size: 14px; font-weight: 700; color: #111827; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.ld-rules-block ul { list-style: disc; padding-left: 18px; }
.ld-rules-block li { font-size: 13px; color: #4b5563; margin-bottom: 6px; line-height: 1.7; }
.ld-rules-block li strong { color: #111827; }

.ld-modal-confirm {
    width: 100%; margin-top: 8px; padding: 13px 0;
    background: #6366f1; color: #fff; font-weight: 700;
    border-radius: 12px;
    box-shadow: 0 6px 14px rgba(99,102,241,.3);
    transition: background .2s;
}
.ld-modal-confirm:hover { background: #4f46e5; }

/* ---------- 确认弹窗（竞猜 / 登录引导，替代原生 confirm） ---------- */
.ld-confirm-modal { max-width: 360px; text-align: center; }
.ld-confirm-icon {
    width: 56px; height: 56px; border-radius: 50%;
    margin: 0 auto 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; color: #fff;
    background: linear-gradient(135deg, #6366f1, #9333ea);
    box-shadow: 0 8px 18px rgba(99,102,241,.3);
}
.ld-confirm-icon.blue {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    box-shadow: 0 8px 18px rgba(59,130,246,.3);
}
.ld-confirm-title { font-size: 18px; font-weight: 900; color: #111827; margin: 0 0 4px; }
.ld-confirm-sub { font-size: 13px; color: #9ca3af; margin: 0 0 16px; line-height: 1.6; }
.ld-confirm-num-wrap {
    background: #f5f7ff; border: 1px dashed #c7d2fe;
    border-radius: 16px; padding: 16px; margin-bottom: 14px;
}
.ld-confirm-num { font-size: 34px; font-weight: 900; color: #6366f1; letter-spacing: 1px; line-height: 1.2; }
.ld-confirm-num-label { font-size: 12px; color: #9ca3af; margin-top: 4px; }
.ld-confirm-warn {
    display: flex; align-items: flex-start; gap: 6px; text-align: left;
    background: #fffbeb; border: 1px solid #fde68a; color: #b45309;
    border-radius: 12px; padding: 10px 12px; font-size: 12px; line-height: 1.6;
    margin-bottom: 14px;
}
.ld-confirm-cost {
    font-size: 13px; color: #6b7280; margin-bottom: 18px;
    display: flex; align-items: center; justify-content: center; gap: 6px;
}
.ld-confirm-cost i { color: #f59e0b; }
.ld-confirm-cost b { color: #111827; }
.ld-confirm-actions { display: flex; gap: 10px; }
.ld-confirm-btn {
    flex: 1; padding: 12px 0; border: none; border-radius: 12px;
    font-size: 14px; font-weight: 700; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    transition: all .15s;
}
.ld-confirm-btn.cancel { background: #f3f4f6; color: #6b7280; }
.ld-confirm-btn.cancel:hover { background: #e5e7eb; }
.ld-confirm-btn.ok {
    background: linear-gradient(135deg, #6366f1, #4f46e5); color: #fff;
    box-shadow: 0 6px 14px rgba(99,102,241,.3);
}
.ld-confirm-btn.ok:hover { background: linear-gradient(135deg, #4f46e5, #4338ca); }
.ld-confirm-btn.ok:active { transform: scale(.97); }

/* ---------- 走势图弹窗 ---------- */
.ld-trend-modal { max-width: 860px; padding: 0; display: flex; flex-direction: column; }
.ld-trend-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid #f3f4f6;
}
.ld-trend-head h3 { font-size: 17px; font-weight: 900; color: #111827; display: flex; align-items: center; gap: 8px; }
.ld-trend-head h3 i { color: #6366f1; }
.ld-trend-head span.sub { font-size: 12px; color: #9ca3af; font-weight: 700; }
.ld-trend-tabs { display: flex; gap: 8px; padding: 12px 20px; border-bottom: 1px solid #f9fafb; overflow-x: auto; }
.ld-trend-tab {
    padding: 7px 16px; border-radius: 10px;
    font-size: 13px; font-weight: 700; white-space: nowrap;
    background: #f3f4f6; color: #4b5563;
    transition: all .2s;
}
.ld-trend-tab.active { background: #6366f1; color: #fff; }
.ld-trend-body { padding: 20px; overflow-y: auto; flex: 1; }
.ld-trend-chart { position: relative; height: 320px; }

/* 移动端：4 个指标切换按钮均分容器宽度，一屏完整显示无需左右滑动 */
@media (max-width: 768px) {
    .ld-trend-tabs { gap: 6px; padding: 10px 12px; overflow-x: visible; }
    .ld-trend-tab { flex: 1; padding: 8px 4px; text-align: center; font-size: 12px; }
}

/* ---------- 走势图悬浮按钮 ---------- */
.ld-trend-fab {
    position: fixed; bottom: 96px; right: 16px;
    z-index: 40; width: 56px; height: 56px; border-radius: 50%;
    background: linear-gradient(135deg, #4ade80, #10b981);
    color: #fff;
    box-shadow: 0 10px 20px rgba(16,185,129,.4);
    display: none; align-items: center; justify-content: center;
    font-size: 20px;
    transition: transform .2s;
}
.ld-trend-fab.show { display: flex; }
.ld-trend-fab:hover { transform: scale(1.1); color: #fff; }

@media (min-width: 768px) {
    .ld-title { font-size: 20px; }
    .ld-phase { font-size: 20px; }
    .ld-list { padding: 16px 16px 80px; }
    .ld-guess-form { flex-direction: row; align-items: stretch; }
    .ld-guess-form .field { flex: 1; }
    .ld-guess-actions { flex: none; }
    .ld-btn-guess, .ld-btn-quota { flex: none; padding: 12px 28px; }
    .ld-trend-fab { bottom: 24px; right: 24px; }
    .ld-overview { grid-template-columns: repeat(4,1fr); padding: 30px 24px; }
    .ld-chart-box { height: 380px; }
}

/* ============================================================
   双布局显隐（769px 断点，与全站一致）
   ============================================================ */
.ld-layout-mobile { display: block; }
.ld-layout-pc { display: none; }
@media (min-width: 769px) {
    .ld-topbar-inner { max-width: 1200px; }
    .ld-layout-mobile { display: none; }
    .ld-layout-pc { display: block; }
}

/* ============================================================
   PC 端仪表盘布局（≥769px）
   ============================================================ */
.ld-pc-wrap { max-width: 1200px; margin: 0 auto; padding: 24px 16px 60px; }

/* Hero 横排统计卡 */
.ld-pc-hero {
    position: relative; overflow: hidden;
    background: #fff; border-radius: 24px;
    border: 1px solid #f3f4f6; box-shadow: 0 2px 8px rgba(0,0,0,.04);
    padding: 28px 32px; margin-bottom: 16px;
    display: flex; align-items: center; gap: 32px;
}
.ld-pc-hero::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, #6366f1, #9333ea);
}
.ld-pc-hero::after {
    content: ''; position: absolute; border-radius: 50%;
    width: 240px; height: 240px; top: -90px; right: -60px;
    background: rgba(99,102,241,.06); pointer-events: none;
}
.ld-pc-hero-left { flex: 1; position: relative; z-index: 1; min-width: 0; }
.ld-pc-hero-left h2 { font-size: 24px; font-weight: 900; color: #111827; margin: 0; }
.ld-pc-hero-left p { font-size: 14px; color: #9ca3af; margin-top: 6px; }
.ld-pc-hero-right { display: flex; gap: 20px; position: relative; z-index: 1; flex-shrink: 0; }
.ld-pc-stat {
    text-align: center; min-width: 90px;
    padding: 10px 18px; border-radius: 16px;
    background: #f9fafb;
}
.ld-pc-stat .k { font-size: 12px; color: #9ca3af; font-weight: 700; }
.ld-pc-stat .v { font-size: 26px; font-weight: 900; color: #374151; margin-top: 4px; }
.ld-pc-stat .v.blue { color: #3b82f6; }
.ld-pc-stat .v.purple { color: #6366f1; }
.ld-pc-stat .v.amber { color: #f59e0b; }

/* 双列网格 */
.ld-pc-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
@media (min-width: 1024px) {
    .ld-pc-grid { grid-template-columns: 1.2fr 1fr; }
}
.ld-pc-grid.ld-pc-single-col { grid-template-columns: 1fr; }

/* 左侧竞猜区 */
.ld-pc-guess-col { display: flex; flex-direction: column; gap: 12px; }

/* 右侧已结算数据 */
.ld-pc-data-col { display: flex; flex-direction: column; gap: 12px; }
.ld-pc-data-head {
    font-size: 16px; font-weight: 900; color: #111827;
    display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
    padding: 0 4px;
}
.ld-pc-data-head i { color: #3b82f6; }
.ld-pc-data-grid {
    display: grid; grid-template-columns: 1fr; gap: 12px;
}
.ld-pc-data-card {
    background: #fff; border-radius: 16px; padding: 16px;
    border: 1px solid #f3f4f6; box-shadow: 0 1px 2px rgba(0,0,0,.03);
    text-decoration: none; display: block; transition: all .2s;
}
.ld-pc-data-card:hover { border-color: #dbeafe; box-shadow: 0 6px 16px rgba(0,0,0,.07); }
.ld-pc-data-card:hover .ld-phase { color: #1890ff; }
.ld-pc-data-card.unpublished { border-style: dashed; background: #fafafa; cursor: default; }
.ld-pc-data-card.unpublished:hover { border-color: #f3f4f6; box-shadow: 0 1px 2px rgba(0,0,0,.03); }
.ld-pc-data-card.unpublished:hover .ld-phase { color: inherit; }

/* 详情视图 PC 端 */
.ld-pc-detail-wrap { max-width: 1200px; margin: 0 auto; padding: 24px 16px 60px; }
.ld-pc-overview {
    background: #fff; border-radius: 24px; padding: 28px 24px;
    border: 1px solid #f3f4f6; margin-bottom: 16px;
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px 16px;
}
.ld-pc-overview .item { text-align: center; }
.ld-pc-overview .k { font-size: 13px; color: #9ca3af; font-weight: 700; margin-bottom: 6px; }
.ld-pc-overview .v { font-size: 28px; font-weight: 900; color: #374151; }
.ld-pc-overview .v.blue { color: #3b82f6; }

.ld-pc-detail-grid {
    display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px;
}
.ld-pc-panel {
    background: #fff; border-radius: 24px; padding: 22px 20px;
    border: 1px solid #f3f4f6;
}
.ld-pc-panel h3 { font-size: 16px; font-weight: 900; color: #111827; display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.ld-pc-panel h3 i { color: #3b82f6; }
.ld-pc-chart-box { position: relative; height: 380px; width: 100%; }

.ld-pc-daily-table { width: 100%; border-collapse: collapse; }
.ld-pc-daily-table th {
    background: #f9fafb; color: #9ca3af; font-size: 11px; font-weight: 700;
    text-align: left; padding: 10px 16px;
}
.ld-pc-daily-table td { padding: 11px 16px; border-bottom: 1px solid #f3f4f6; font-size: 14px; }
.ld-pc-daily-table tr:last-child td { border-bottom: none; }
.ld-pc-daily-table .date { font-weight: 700; color: #4b5563; }
.ld-pc-daily-table .cnt { font-weight: 900; color: #2563eb; }

/* ============================================================
   暗黑模式适配
   ============================================================ */
html[data-theme="dark"] body { background: var(--c-bg); }
html[data-theme="dark"] .ld-topbar { background: var(--c-surface); border-bottom-color: var(--c-border); }
html[data-theme="dark"] .ld-back { background: var(--c-bg-2); color: var(--c-text-2); }
html[data-theme="dark"] .ld-title { color: var(--c-text); }
html[data-theme="dark"] .ld-rules-btn { background: rgba(99,102,241,.18); }
html[data-theme="dark"] .ld-rules-btn:hover { background: rgba(99,102,241,.3); }
html[data-theme="dark"] .ld-empty { background: var(--c-surface); border-color: var(--c-border); }
html[data-theme="dark"] .ld-empty-icon { background: var(--c-bg-2); color: var(--c-text-3); }
html[data-theme="dark"] .ld-empty p { color: var(--c-text-3); }
html[data-theme="dark"] .ld-card { background: var(--c-surface); border-color: var(--c-border); }
html[data-theme="dark"] .ld-card:hover { border-color: #2c4a77; }
html[data-theme="dark"] .ld-phase { color: var(--c-text); }
html[data-theme="dark"] .ld-card:hover .ld-phase { color: #47a3f3; }
html[data-theme="dark"] .ld-rate { color: #6d9ee8; }
html[data-theme="dark"] .ld-rate i.arrow { color: var(--c-text-3); }
html[data-theme="dark"] .ld-rate.muted { color: var(--c-text-3); }
html[data-theme="dark"] .ld-card-row2 { color: var(--c-text-3); }
html[data-theme="dark"] .ld-stats { background: rgba(255,255,255,.04); }
html[data-theme="dark"] .ld-stat .k { color: var(--c-text-2); }
html[data-theme="dark"] .ld-stat .v { color: var(--c-text); }
html[data-theme="dark"] .ld-stat .v.blue { color: #6d9ee8; }
html[data-theme="dark"] .ld-stat .v.red { color: #f78989; }
html[data-theme="dark"] .ld-card.guess { background: rgba(250,204,21,.07); border-color: rgba(250,204,21,.3); }
html[data-theme="dark"] .ld-card.guess:hover { border-color: rgba(250,204,21,.5); }
html[data-theme="dark"] .ld-guess-divider { border-top-color: rgba(255,255,255,.08); }
html[data-theme="dark"] .ld-myguess { color: var(--c-text-2); }
html[data-theme="dark"] .ld-tag { background: var(--c-bg-2); color: var(--c-text-3); }
html[data-theme="dark"] .ld-guess-input { background: var(--c-surface); border-color: var(--c-border); color: var(--c-text); }
html[data-theme="dark"] .ld-guess-input:focus { box-shadow: 0 0 0 2px rgba(99,102,241,.3); }
html[data-theme="dark"] .ld-guess-hint { color: var(--c-text-3); }
html[data-theme="dark"] .ld-card.closed { border-color: rgba(249,115,22,.3); }
html[data-theme="dark"] .ld-card.unpublished { background: var(--c-bg-2); border-color: rgba(255,255,255,.1); }
html[data-theme="dark"] .ld-card.unpublished:hover { border-color: rgba(255,255,255,.1); }
html[data-theme="dark"] .ld-pending-note { background: rgba(255,255,255,.06); color: var(--c-text-3); }
html[data-theme="dark"] .ld-lock-box { background: rgba(249,115,22,.1); }
html[data-theme="dark"] .ld-lock-icon { background: rgba(249,115,22,.18); }
html[data-theme="dark"] .ld-lock-box .t1 { color: #fdba74; }
html[data-theme="dark"] .ld-overview,
html[data-theme="dark"] .ld-panel,
html[data-theme="dark"] .ld-modal { background: var(--c-surface); border-color: var(--c-border); }
html[data-theme="dark"] .ld-overview .k { color: var(--c-text-3); }
html[data-theme="dark"] .ld-overview .v { color: var(--c-text); }
html[data-theme="dark"] .ld-overview .v.blue { color: #6d9ee8; }
html[data-theme="dark"] .ld-panel h3 { color: var(--c-text); }
html[data-theme="dark"] .ld-daily-table th { background: var(--c-bg-2); color: var(--c-text-3); }
html[data-theme="dark"] .ld-daily-table td { border-bottom-color: var(--c-border); }
html[data-theme="dark"] .ld-daily-table .date { color: var(--c-text-2); }
html[data-theme="dark"] .ld-daily-table .cnt { color: #6d9ee8; }
html[data-theme="dark"] .ld-modal-head h3 { color: var(--c-text); }
html[data-theme="dark"] .ld-modal-head h3 .ic { background: rgba(99,102,241,.2); }
html[data-theme="dark"] .ld-modal-close { color: var(--c-text-3); }
html[data-theme="dark"] .ld-modal-close:hover { background: var(--c-bg-2); }
html[data-theme="dark"] .ld-rules-block { background: var(--c-bg-2); }
html[data-theme="dark"] .ld-rules-block h4 { color: var(--c-text); }
html[data-theme="dark"] .ld-rules-block li { color: var(--c-text-2); }
html[data-theme="dark"] .ld-rules-block li strong { color: var(--c-text); }
html[data-theme="dark"] .ld-trend-head { border-bottom-color: var(--c-border); }
html[data-theme="dark"] .ld-trend-head h3 { color: var(--c-text); }
html[data-theme="dark"] .ld-trend-head span.sub { color: var(--c-text-3); }
html[data-theme="dark"] .ld-trend-tabs { border-bottom-color: var(--c-border); }
html[data-theme="dark"] .ld-trend-tab { background: var(--c-bg-2); color: var(--c-text-2); }

/* ---------- 确认弹窗暗黑模式 ---------- */
html[data-theme="dark"] .ld-confirm-title { color: var(--c-text); }
html[data-theme="dark"] .ld-confirm-sub { color: var(--c-text-3); }
html[data-theme="dark"] .ld-confirm-num-wrap { background: rgba(99,102,241,.1); border-color: rgba(99,102,241,.35); }
html[data-theme="dark"] .ld-confirm-num { color: #a5b4fc; }
html[data-theme="dark"] .ld-confirm-num-label { color: var(--c-text-3); }
html[data-theme="dark"] .ld-confirm-warn { background: rgba(245,158,11,.12); border-color: rgba(245,158,11,.35); color: #fbbf24; }
html[data-theme="dark"] .ld-confirm-cost { color: var(--c-text-2); }
html[data-theme="dark"] .ld-confirm-cost b { color: var(--c-text); }
html[data-theme="dark"] .ld-confirm-btn.cancel { background: var(--c-bg-2); color: var(--c-text-2); }
html[data-theme="dark"] .ld-confirm-btn.cancel:hover { background: rgba(255,255,255,.1); }

/* ---------- PC 端暗黑模式 ---------- */
html[data-theme="dark"] .ld-pc-hero { background: var(--c-surface); border-color: var(--c-border); }
html[data-theme="dark"] .ld-pc-hero::after { background: rgba(99,102,241,.08); }
html[data-theme="dark"] .ld-pc-hero-left h2 { color: var(--c-text); }
html[data-theme="dark"] .ld-pc-hero-left p { color: var(--c-text-3); }
html[data-theme="dark"] .ld-pc-stat { background: var(--c-bg-2); }
html[data-theme="dark"] .ld-pc-stat .k { color: var(--c-text-3); }
html[data-theme="dark"] .ld-pc-stat .v { color: var(--c-text); }
html[data-theme="dark"] .ld-pc-stat .v.blue { color: #6d9ee8; }
html[data-theme="dark"] .ld-pc-stat .v.purple { color: #a78bfa; }
html[data-theme="dark"] .ld-pc-stat .v.amber { color: #fbbf24; }
html[data-theme="dark"] .ld-pc-data-head { color: var(--c-text); }
html[data-theme="dark"] .ld-pc-data-card { background: var(--c-surface); border-color: var(--c-border); }
html[data-theme="dark"] .ld-pc-data-card:hover { border-color: #2c4a77; }
html[data-theme="dark"] .ld-pc-data-card:hover .ld-phase { color: #47a3f3; }
html[data-theme="dark"] .ld-pc-data-card.unpublished { background: var(--c-bg-2); border-color: rgba(255,255,255,.1); }
html[data-theme="dark"] .ld-pc-data-card.unpublished:hover { border-color: rgba(255,255,255,.1); }
html[data-theme="dark"] .ld-pc-overview,
html[data-theme="dark"] .ld-pc-panel { background: var(--c-surface); border-color: var(--c-border); }
html[data-theme="dark"] .ld-pc-overview .k { color: var(--c-text-3); }
html[data-theme="dark"] .ld-pc-overview .v { color: var(--c-text); }
html[data-theme="dark"] .ld-pc-overview .v.blue { color: #6d9ee8; }
html[data-theme="dark"] .ld-pc-panel h3 { color: var(--c-text); }
html[data-theme="dark"] .ld-pc-daily-table th { background: var(--c-bg-2); color: var(--c-text-3); }
html[data-theme="dark"] .ld-pc-daily-table td { border-bottom-color: var(--c-border); }
html[data-theme="dark"] .ld-pc-daily-table .date { color: var(--c-text-2); }
html[data-theme="dark"] .ld-pc-daily-table .cnt { color: #6d9ee8; }

/* ---------- 开奖结果弹窗 ---------- */
.ld-results-modal { max-width: 480px; }
.ld-modal-head h3 .ic.green { background: #d1fae5; color: #10b981; }
.ld-results-body { max-height: 62vh; overflow-y: auto; padding-right: 2px; margin-bottom: 10px; }
.ld-results-body .ld-card:last-child { margin-bottom: 0; }
html[data-theme="dark"] .ld-modal-head h3 .ic.green { background: rgba(16,185,129,.2); }

/* ---------- 已开奖结果卡片 ---------- */
.ld-card.settled { border-color: #d1fae5; }
.ld-ribbon.green { background: linear-gradient(to left, #34d399, #10b981); }
.ld-result-num { color: #10b981; font-weight: 800; font-size: 16px; }

.ld-result-panel {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
    background: rgba(236,253,245,.7);
    border-radius: 14px; padding: 10px 12px; margin-bottom: 10px;
}
.ld-result-cell { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.ld-result-cell .k { font-size: 12px; color: #6b7280; }
.ld-result-cell .v { font-size: 14px; font-weight: 700; color: #374151; }
.ld-result-cell .v.blue { color: #3b82f6; }

.ld-result-line {
    font-size: 14px; font-weight: 700; padding: 8px 10px;
    border-radius: 10px; margin-bottom: 6px;
    display: flex; align-items: center; gap: 7px;
}
.ld-result-line.win { background: #ecfdf5; color: #047857; }
.ld-result-line.lose { background: #fef2f2; color: #b91c1c; }
.ld-result-line.muted { background: #f3f4f6; color: #6b7280; font-weight: 500; }
.ld-result-line.lucky { background: #fffbeb; color: #b45309; }

html[data-theme="dark"] .ld-card.settled { background: var(--c-surface); border-color: rgba(16,185,129,.3); }
html[data-theme="dark"] .ld-result-panel { background: rgba(16,185,129,.1); }
html[data-theme="dark"] .ld-result-cell .k { color: var(--c-text-2); }
html[data-theme="dark"] .ld-result-cell .v { color: var(--c-text); }
html[data-theme="dark"] .ld-result-cell .v.blue { color: #6d9ee8; }
html[data-theme="dark"] .ld-result-line.win { background: rgba(16,185,129,.12); color: #6ee7b7; }
html[data-theme="dark"] .ld-result-line.lose { background: rgba(239,68,68,.12); color: #fca5a5; }
html[data-theme="dark"] .ld-result-line.muted { background: var(--c-bg-2); color: var(--c-text-3); }
html[data-theme="dark"] .ld-result-line.lucky { background: rgba(245,158,11,.14); color: #fbbf24; }

