﻿:root {
    --bg: #edf1f5;
    --bg-soft: #eef4ff;
    --card: #ffffff;
    --border: #e5e7eb;
    --text: #1f2937;
    --sub: #6b7280;
    --blue: #3b82f6;
    --blue-soft: #eff6ff;
    --blue-soft-2: #dbeafe;
    --green: #16a34a;
    --orange: #f59e0b;
    --red: #ef4444;
    --red-soft: #fef2f2;
    --shadow: 0 8px 24px rgba(15, 23, 42, .06);
    --radius: 4px;
    --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    --c1: #60a5fa;
    --c2: #22c55e;
    --c3: #f59e0b;
    --c4: #a78bfa;
    --c5: #8b5cf6;
    --c6: #ef4444;
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--sans);
    color: var(--text);
    background: #edf1f5;
    background-color: var(--bg);
    min-height: 100vh;
    padding: 62px 0 calc(92px + env(safe-area-inset-bottom));
}

a {
    text-decoration: none;
}

.hidden {
    display: none !important;
}

.site-app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 90;
    width: 100%;
    background: rgba(255, 255, 255, .92);
    border-bottom: 1px solid rgba(229, 231, 235, .88);
    box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.site-app-header-inner {
    max-width: 760px;
    min-height: 62px;
    margin: 0 auto;
    padding: calc(env(safe-area-inset-top, 0px) + 10px) 14px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.site-app-logo {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
}

.site-app-logo-box {
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--blue);
}

.site-app-logo-box img {
    width: 100%;
    height: 100%;
    display: block;
}

.site-app-logo-text {
    min-width: 0;
    display: block;
}

.site-app-logo-text strong,
.site-app-logo-text small {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.site-app-logo-text strong {
    color: var(--text);
    font-size: 16px;
    line-height: 1.1;
    font-weight: 900;
}

.site-app-logo-text small {
    margin-top: 3px;
    color: var(--sub);
    font-size: 11px;
    line-height: 1.2;
}

.site-app-header-actions {
    flex: 0 0 auto;
}

.site-app-menu {
    position: relative;
    z-index: 20;
}

.site-app-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 36px;
    padding: 0 12px;
    border-radius: var(--radius);
    border: 1px solid #cfe0ff;
    background: var(--blue-soft);
    color: #245bba;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.site-app-menu-btn:hover {
    background: var(--blue-soft-2);
}

.site-app-menu-icon {
    display: inline-block;
    font-size: 13px;
    line-height: 1;
}

.site-app-menu-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 50;
    width: 154px;
    padding: 6px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .98);
    border: 1px solid rgba(229, 231, 235, .95);
    box-shadow: 0 12px 30px rgba(15, 23, 42, .14);
}

.site-app-menu-item {
    display: flex;
    align-items: center;
    min-height: 38px;
    padding: 0 10px;
    border-radius: var(--radius);
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
}

.site-app-menu-item:hover {
    background: var(--blue-soft);
    color: #245bba;
}

.app {
    max-width: 760px;
    margin: 0 auto;
    padding: 14px 14px 28px;
}

/* 顶部 */
.mini-btn {
    height: 34px;
    padding: 0 12px;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mini-btn.primary {
    background: var(--blue);
    color: #fff;
    border-color: var(--blue);
    box-shadow: 0 6px 16px rgba(59,130,246,.20);
}

.mini-btn.ghost {
    background: #fff;
    color: var(--blue);
    border-color: #cfe0ff;
}

.mini-btn:active {
    transform: scale(.98);
}

/* Hero */
.hero {
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    border-radius: 4px;
    padding: 16px 15px 14px;
    color: #fff;
    margin-bottom: 14px;
    box-shadow: 0 10px 22px rgba(59,130,246,.16);
}

.hero-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.hero-home-link {
    display: inline-flex;
    align-items: center;
    color: rgba(255,255,255,.88);
    font-size: 12px;
    line-height: 1.4;
    padding-top: 2px;
    font-weight: 600;
    border-bottom: 1px solid rgba(255,255,255,.26);
}

.hero-title {
    font-size: 11px;
    letter-spacing: .08em;
    opacity: .9;
    margin-bottom: 8px;
}

.hero-main {
    font-size: 24px;
    line-height: 1.18;
    font-weight: 760;
    letter-spacing: -.02em;
    margin-bottom: 8px;
}

.hero-sub {
    max-width: 40em;
    font-size: 13px;
    line-height: 1.7;
    opacity: .9;
}

.em-red {
    color: #fff3f3;
    font-weight: 800;
    text-decoration: underline;
    text-decoration-color: rgba(255,255,255,.5);
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 12px;
}

.stat {
    background: rgba(255,255,255,.16);
    padding: 9px 8px;
    border-radius: 4px;
    text-align: center;
    font-size: 11px;
    line-height: 1.35;
}

.stat strong {
    display: block;
    font-size: 16px;
    margin-top: 2px;
    font-family: var(--mono);
    color: #fff;
}
.hero-actions {
    display: flex;
    justify-content: flex-start;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.hero-btn {
    height: 34px;
    padding: 0 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 800;
}

.hero-btn-light {
    background: rgba(255,255,255,.18);
    color: #fff;
    border: 1px solid rgba(255,255,255,.28);
}

.hero-btn-light:hover {
    background: rgba(255,255,255,.24);
}

.hero-btn-solid {
    background: #fff;
    color: var(--blue);
    border: 1px solid rgba(255,255,255,.48);
}

.hero-btn-solid:hover {
    background: #f8fbff;
}

.hero-text-btn {
    height: 34px;
    padding: 0;
    border: none;
    background: transparent;
    color: rgba(255,255,255,.92);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.hero-text-btn:hover {
    color: #fff;
}

.hero .hero-actions {
    margin-top: 0;
}
/* 通用卡片 */
.filter-card,
.list-section {
    margin-bottom: 14px;
}

.filter-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 12px;
    box-shadow: var(--shadow);
}

.filter-card-slim {
    padding: 8px 10px;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.section-head.compact {
    margin-bottom: 8px;
}

.section-head h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -.01em;
    color: #111827;
}

.section-more {
    font-size: 12px;
    color: var(--sub);
}

/* 模型区 */
.modelBox {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.modelBoxSlim {
    margin-top: 0;
    gap: 10px;
    flex-wrap: nowrap;
}

.modelInlineLabel {
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 800;
    color: #6b7280;
}

.select {
    width: auto;
    min-width: 100px;
    min-height: 42px!important;
    height:42px!important;
    line-height:42px!important;
    border-radius: 4px;
    border: 1px solid #dbe2ea;
    background: #fff;
    padding: 0 12px;
    font-size: 14px;
    color: var(--text);
    outline: none;
}

.select:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(59,130,246,.10);
}

.select-compact {
    min-width: 92px;
    min-height: 34px !important;
    height: 34px !important;
    line-height: 34px !important;
    font-size: 13px;
    padding: 0 10px;
}

.modelDesc {
    min-height: 42px;
    border-radius: 4px;
    background: #f8fafc;
    border: 1px solid #edf1f5;
    padding: 10px 12px;
    color: var(--sub);
    font-size: 12px;
    line-height: 1.6;
    flex: 1;
}

.modelDescInline {
    min-height: 34px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* tabs */
.tabsWrap {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.tabsWrap::-webkit-scrollbar {
    height: 6px;
}

.tabsWrap::-webkit-scrollbar-thumb {
    background: #d7dee8;
    border-radius: 999px;
}

.tabs {
    display: inline-flex;
    gap: 8px;
    white-space: nowrap;
    min-width: max-content;
    padding-bottom: 2px;
}

.tab {
    cursor: pointer;
    user-select: none;
    padding: 9px 12px;
    border-radius: 4px;
    border: 1px solid #dfe5ed;
    background: #fff;
    color: #374151;
    font-size: 13px;
    font-weight: 700;
    display: grid;
    gap: 3px;
    align-items: center;
    flex: 0 0 auto;
    transition: .16s ease;
}

.tab .dow {
    font-size: 12px;
    color: #6b7280;
    font-family: var(--mono);
}

.tab .date {
    font-size: 12px;
    font-family: var(--mono);
}

.tab.active {
    background: var(--blue);
    color: #fff;
    border-color: var(--blue);
    box-shadow: 0 8px 18px rgba(59,130,246,.18);
}

.tab.active .dow,
.tab.active .date {
    color: rgba(255,255,255,.96);
}

/* 列表 */
.list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.view-switch {
    display: inline-flex;
    align-items: center;
    padding: 2px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #fff;
}

.view-switch-btn {
    height: 28px;
    padding: 0 10px;
    border: none;
    background: transparent;
    color: #6b7280;
    font-size: 12px;
    font-weight: 700;
    border-radius: 999px;
    cursor: pointer;
}

.view-switch-btn.active {
    background: #111827;
    color: #fff;
}

.hint {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 14px;
    font-size: 13px;
    color: var(--sub);
    box-shadow: var(--shadow);
}

/* 比赛卡 */
.card {
    border-radius: 4px;
    border: 1px solid var(--border);
    background: var(--card);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.deepMatch {
    border: 2px solid rgba(239,68,68,.78) !important;
    box-shadow: 0 6px 14px rgba(239,68,68,.12), 0 8px 24px rgba(15,23,42,.06) !important;
}

.cardHead {
    padding: 13px 13px 12px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border-bottom: 1px solid #eef2f7;
    background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
}

.leftInfo {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr);
    align-items: flex-start;
    gap: 10px;
    width: 100%;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-top: 6px;
    flex: 0 0 auto;
    box-shadow: 0 0 0 3px rgba(59,130,246,.08);
}

.meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    width: 100%;
}

.line1 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px 12px;
    width: 100%;
}

.line1-main {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.line1-tail {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: nowrap;
    justify-self: end;
    white-space: nowrap;
}

.league {
    font-size: 13px;
    color: #111827;
    /*font-weight: 800;*/
}

.lottery {
    font-family: var(--mono);
    font-size: 12px;
    color: #4b5563;
}

.time {
    font-family: var(--mono);
    font-size: 12px;
    color: #6b7280;
}

.teams {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    font-size: 13px;
    color: #111827;
    line-height: 1.5;
    font-weight: 700;
}

.teams .home,
.teams .away {
    word-break: break-all;
}

.goal-line-tag {
    margin-left: 4px;
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.goal-line-tag.is-positive {
    color: #dc2626;
}

.goal-line-tag.is-negative {
    color: #16a34a;
}

.teams .mid {
    font-family: var(--mono);
    color: var(--blue);
    font-size: 12px;
    font-weight: 700;
}

.chip {
    font-size: 12px;
    padding: 6px 9px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    color: #4b5563;
    white-space: nowrap;
    /*font-weight: 700;*/
}

.chip.good {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #15803d;
}

.chip.warn {
    border-color: #fde68a;
    background: #fffbeb;
    color: #b45309;
}

.chip.bad {
    border-color: #fecaca;
    background: #fef2f2;
    color: #b91c1c;
}

.statusText {
    padding: 0;
    border: none;
    background: transparent;
    border-radius: 0;
    font-size: 12px;
    font-weight: 400;
}

.detailChip {
    text-decoration: none;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--blue);
    white-space: nowrap;
    font-size: 12px;
    font-weight: 400;
}

.detailChip::after {
    content: ">";
    margin-left: 2px;
    font-size: 12px;
}

.compactMatch {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: start;
    padding: 12px 13px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    background: #fff;
    box-shadow: var(--shadow);
    color: inherit;
}

.compactMain {
    min-width: 0;
}

.compactTeams {
    font-size: 14px;
    line-height: 1.5;
    font-weight: 700;
    color: #0f172a;
}

.compactVs {
    margin: 0 6px;
    font-family: var(--mono);
    color: #6b7280;
    font-weight: 700;
}

.compactPick {
    margin-top: 5px;
    font-size: 13px;
    line-height: 1.55;
    color: #1f2937;
    font-weight: 650;
}

.compactMeta {
    margin-top: 4px;
    font-size: 11px;
    line-height: 1.65;
    color: #94a3b8;
}

.compactSide {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    white-space: nowrap;
}

.compactTime {
    font-size: 11px;
    color: #94a3b8;
    font-family: var(--mono);
}

.compactStars {
    font-size: 11px;
    letter-spacing: 1px;
    font-weight: 700;
    color: #94a3b8;
}

.compactStars.is-strong {
    color: #166534;
}

.compactStars.is-medium {
    color: #1d4ed8;
}

.compactStars.is-weak {
    color: #b45309;
}

.compactState {
    font-size: 11px;
    color: #94a3b8;
}

.cardBody {
    padding: 15px 14px 13px;
    display: flex;
    flex-direction: column;
    gap: 11px;
    background: #fff;
}

.decisionBar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid #f1f5f9;
}

.decisionMainWrap {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.decisionKicker {
    font-size: 11px;
    color: #6b7280;
    font-weight: 700;
}

.decisionMain {
    margin-top: 0;
    font-size: 18px;
    line-height: 1.38;
    font-weight: 720;
    color: #0f172a;
    letter-spacing: -0.015em;
}

.decisionSub {
    margin-top: 0;
    font-size: 12px;
    line-height: 1.7;
    color: #94a3b8;
}

.decisionBadge {
    flex: 0 0 auto;
    min-width: 74px;
    padding: 0;
    border-radius: 999px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    border: none;
    background: transparent;
    color: #94a3b8;
}

.decisionBadge.is-strong {
    color: #166534;
}

.decisionBadge.is-medium {
    color: #1d4ed8;
}

.decisionBadge.is-weak {
    color: #b45309;
}

.commentaryText {
    font-size: 13px;
    line-height: 1.9;
    color: #475569;
}

.memo-core {
    color: #111827;
    font-weight: 800;
}

.memo-core-soft {
    color: #2563eb;
}

.memo-core-warn {
    color: #b45309;
}

.memo-rate {
    color: #111827;
}

.memo-weak {
    color: #9ca3af;
}

.richText p {
    margin: 0 0 6px;
}

.richText p:last-child {
    margin-bottom: 0;
}

.memoInlineTag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1px 6px;
    margin-right: 4px;
    border-radius: 999px;
/*    background: #eff6ff;
    border: 1px solid #dbeafe;*/
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.quickMeta {
    font-size: 11px;
    line-height: 1.7;
    color: #94a3b8;
    padding-bottom: 2px;
}

.probStack {
    padding: 5px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #fff;
}

.detailFold {
    border: none;
    border-top: 1px solid #eef2f7;
    border-radius: 0;
    overflow: hidden;
    background: transparent;
}

details {
    background: #fbfdff;
    border: 1px solid #edf2f7;
    border-radius: 4px;
    overflow: hidden;
}

summary {
    cursor: pointer;
    list-style: none;
    padding: 11px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    user-select: none;
    font-weight: 700;
    font-size: 12px;
    color: #1f2937;
    background: #f8fbff;
}

summary::-webkit-details-marker {
    display: none;
}

.summaryRight {
    display: flex;
    gap: 8px;
    align-items: center;
    color: #94a3b8;
    font-size: 11px;
    font-family: var(--mono);
}

.panel {
    padding: 11px 12px 12px;
    border-top: 1px solid #edf2f7;
    background: #fff;
}

.stackRow {
    display: grid;
    grid-template-columns: 98px 1fr;
    gap: 10px;
    align-items: start;
    margin: 10px 0;
}

.rowLabel {
    font-size: 12.5px;
    color: #374151;
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    /*font-weight: 700;*/
}

.rowLabel .pct {
    font-family: var(--mono);
    font-size: 11px;
    color: #6b7280;
    padding: 2px 7px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #f9fafb;
    font-weight: 700;
}

.barWrap {
    width: 100%;
    height: 12px;
    border-radius: 999px;
    background: #edf2f7;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    position: relative;
}

.barOuter {
    transform-origin: left center;
    height: 100%;
    width: 100%;
}

.bar {
    height: 100%;
    width: 100%;
    display: flex;
}

.seg {
    height: 100%;
    min-width: 0;
    position: relative;
}

.seg::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    right: -.5px;
    width: 1px;
    background: rgba(255,255,255,.55);
}

.seg:last-child::after {
    display: none;
}

.legend {
    margin-top: 10px;
    display: flex;
    gap: 8px 10px;
    color: #4b5563;
    font-size: 12px;
    flex-wrap: wrap;
}

.lg {
    display: flex;
    gap: 5px;
    align-items: center;
    min-width: 0;
    background: #f8fafc;
    border: 1px solid #eef2f7;
    border-radius: 999px;
    padding: 5px 4px;
}

.sw {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex: 0 0 auto;
}

.lg .t {
    font-family: var(--mono);
    color: #374151;
    /*font-weight: 700;*/
}

.lg .v {
    font-family: var(--mono);
    color: #111827;
    margin-left: 2px;
    font-size: 12px;
    font-weight: 800;
}

.sp {
    font-size: 10px !important;
    font-weight: 600 !important;
    color: #6b7280 !important;
    margin-left: 3px;
}

/* footer */
.site-footer {
    margin-top: 20px;
    padding: 16px 12px calc(20px + env(safe-area-inset-bottom));
    text-align: center;
    font-size: 12px;
    color: var(--sub);
}

.law-note {
    margin-bottom: 10px;
    color: #b91c1c;
    font-weight: 700;
}

.footer-inner {
    max-width: 760px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    line-height: 1.8;
}

.footer-links a {
    color: var(--sub);
    text-decoration: none;
    padding: 2px 4px;
}

.footer-links .sep {
    opacity: .4;
}

.footer-meta {
    margin-top: 10px;
    line-height: 1.6;
}

.footer-meta .slogan {
    margin-top: 3px;
    font-size: 11px;
    color: #8b93a1;
}

/* back top */
#backToTop {
    position: fixed;
    right: 18px;
    bottom: calc(94px + env(safe-area-inset-bottom));
    width: 42px;
    height: 42px;
    line-height: 42px;
    text-align: center;
    border-radius: 50%;
    cursor: pointer;
    user-select: none;
    background: var(--blue);
    border: none;
    color: #fff;
    box-shadow: 0 10px 24px rgba(59,130,246,.28);
    font-size: 18px;
    font-weight: 700;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease;
    z-index: 20;
}

#backToTop.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.app-tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 95;
    width: 100%;
    background: rgba(255, 255, 255, .96);
    border-top: 1px solid rgba(229, 231, 235, .95);
    box-shadow: 0 -12px 30px rgba(15, 23, 42, .10);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.app-tabbar-inner {
    max-width: 760px;
    margin: 0 auto;
    padding: 6px 10px calc(6px + env(safe-area-inset-bottom, 0px));
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
}

.app-tab {
    min-width: 0;
    min-height: 52px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border-radius: var(--radius);
    color: #64748b;
    text-decoration: none;
    font-size: 11px;
    font-weight: 800;
}

.app-tab svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    stroke-width: 1.8;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.app-tab.active {
    color: #245bba;
    background: var(--blue-soft);
}

/* mobile */
@media (max-width: 768px) {
    .site-app-header-inner {
        min-height: 56px;
        padding: calc(env(safe-area-inset-top, 0px) + 8px) 6px 8px;
        gap: 8px;
    }

    .site-app-logo-box {
        width: 34px;
        height: 34px;
    }

    .site-app-logo-text small {
        max-width: 180px;
    }

    .site-app-menu-btn {
        min-height: 36px;
        padding: 0 10px;
    }

    .site-app-menu-panel {
        width: 146px;
    }

    .app-tabbar-inner {
        padding: 5px 6px calc(5px + env(safe-area-inset-bottom, 0px));
        gap: 2px;
    }

    .app-tab {
        min-height: 50px;
    }

    .app {
        padding: 12px 12px 24px;
    }

    .stats {
        grid-template-columns: repeat(3, 1fr);
    }

    .leftInfo {
        min-width: 0;
    }

    .rightTags {
        width: 100%;
        justify-content: flex-start;
    }

    .stackRow {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .modelBoxSlim {
        flex-wrap: wrap;
    }

    .modelDescInline {
        width: 100%;
        white-space: normal;
        min-height: auto;
        padding: 8px 10px;
        align-items: flex-start;
    }

    .compactMatch {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .compactSide {
        align-items: flex-start;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }

    .focusRow {
        grid-template-columns: 20px 1fr;
    }

    .focusLevel {
        grid-column: 2;
    }
}

@media (max-width: 480px) {
    .logo-title {
        font-size: 16px;
    }

    .hero-main {
        font-size: 20px;
    }

    .stat strong {
        font-size: 15px;
    }

    .teams {
        font-size: 14px;
    }

    .legend {
        gap: 6px;
    }

    .lg {
        padding: 4px 7px;
    }
}
/* 概率分析面板 */
.section-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
#btnAnalysisTool {
    position: relative;
}

#btnAnalysisTool:hover {
    background: rgba(255,255,255,.24);
}

#btnDownloadData {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border-color: #dc2626;
    color: #fff;
    box-shadow: 0 10px 22px rgba(239, 68, 68, .26);
}

#btnDownloadData:hover {
    background: linear-gradient(135deg, #f05252, #dc2626);
    border-color: #dc2626;
}
.analysis-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(15, 23, 42, .42);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 14px;
}

.analysis-modal.show {
    display: flex;
}

.analysis-dialog {
    width: 100%;
    max-width: 620px;
    max-height: calc(100vh - 28px);
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    box-shadow: 0 18px 44px rgba(15, 23, 42, .18);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.analysis-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px 9px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border-bottom: 1px solid #edf2f7;
    flex: 0 0 auto;
}

.analysis-kicker {
    font-size: 11px;
    color: #6b7280;
    margin-bottom: 2px;
}

.analysis-title {
    font-size: 16px;
    font-weight: 800;
    color: #111827;
    line-height: 1.2;
}

.analysis-close {
    width: 32px;
    height: 32px;
    border: 1px solid #dbe2ea;
    background: #fff;
    color: #374151;
    border-radius: 4px;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    flex: 0 0 auto;
}

.analysis-close:hover {
    background: #f8fafc;
}

.analysis-body {
    padding: 10px 12px 12px;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1 1 auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.analysis-body::-webkit-scrollbar {
    width: 8px;
}

.analysis-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
}

.analysis-grid {
    display: grid;
    grid-template-columns: 1fr 140px;
    gap: 10px;
}

.analysis-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.analysis-field label {
    font-size: 11px;
    color: #4b5563;
    font-weight: 700;
}

.analysis-select {
    width: 100%;
    min-width: 0;
    min-height: 38px;
    font-size: 13px;
}

.analysis-input {
    width: 100%;
    min-height: 38px;
    border-radius: 4px;
    border: 1px solid #dbe2ea;
    background: #fff;
    padding: 0 10px;
    font-size: 13px;
    color: var(--text);
    outline: none;
    font-family: var(--mono);
}

.analysis-input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(59,130,246,.10);
}

.analysis-pool {
    margin-top: 10px;
    border: 1px solid #edf2f7;
    border-radius: 4px;
    background: #fff;
    overflow: hidden;
}

.analysis-pool-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    background: #f8fbff;
    border-bottom: 1px solid #edf2f7;
}

.analysis-pool-title {
    font-size: 13px;
    font-weight: 800;
    color: #111827;
}

.analysis-pool-tip {
    font-size: 11px;
    color: #6b7280;
}

.analysis-option-list {
    padding: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.analysis-option-item {
    position: relative;
}

.analysis-option-item input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.analysis-option-item span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    height: 30px;
    padding: 0 10px;
    border-radius: 4px;
    border: 1px solid #dbe2ea;
    background: #fff;
    color: #374151;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: .16s ease;
    user-select: none;
    line-height: 1;
}

.analysis-option-item input:checked + span {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
    box-shadow: 0 6px 14px rgba(59,130,246,.16);
}

.analysis-option-item.is-disabled span {
    opacity: .45;
    cursor: not-allowed;
}

.analysis-tip {
    margin-top: 10px;
    padding: 8px 10px;
    border: 1px solid #e8edf5;
    background: #f8fafc;
    color: #6b7280;
    font-size: 11px;
    line-height: 1.5;
    border-radius: 4px;
}

.analysis-toolbar {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.analysis-toolbar .mini-btn {
    height: 34px;
    font-size: 13px;
    padding: 0 12px;
}

.analysis-result {
    margin-top: 10px;
}

.analysis-empty {
    border: 1px dashed #dbe2ea;
    background: #fff;
    border-radius: 4px;
    padding: 12px;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.55;
}

.analysis-card-box {
    border: 1px solid #edf2f7;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
}

.analysis-card-head {
    padding: 9px 10px;
    background: #f8fbff;
    border-bottom: 1px solid #edf2f7;
}

.analysis-card-title {
    font-size: 13px;
    font-weight: 800;
    color: #111827;
}

.analysis-card-sub {
    margin-top: 3px;
    font-size: 11px;
    color: #6b7280;
    line-height: 1.45;
}

.analysis-stats {
    padding: 10px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    background: #fff;
}

.analysis-stat {
    border: 1px solid #edf2f7;
    background: #f8fafc;
    border-radius: 4px;
    padding: 8px 6px;
    text-align: center;
}

.analysis-stat-label {
    font-size: 10px;
    color: #6b7280;
    line-height: 1.35;
}

.analysis-stat-value {
    margin-top: 3px;
    font-size: 16px;
    font-weight: 800;
    color: #111827;
    font-family: var(--mono);
    line-height: 1.15;
}

.analysis-stat-value.blue {
    color: var(--blue);
}

.analysis-stat-value.green {
    color: var(--green);
}

.analysis-stat-value.orange {
    color: var(--orange);
}

.analysis-table-wrap {
    padding: 0 10px 10px;
    overflow-x: auto;
    background: #fff;
}

.analysis-table {
    width: 100%;
    min-width: 480px;
    border-collapse: collapse;
    font-size: 12px;
}

.analysis-table th,
.analysis-table td {
    border: 1px solid #edf2f7;
    padding: 6px 7px;
    text-align: center;
}

.analysis-table th {
    background: #f8fafc;
    color: #374151;
    font-weight: 800;
}

.analysis-table td {
    color: #111827;
    font-family: var(--mono);
}

.analysis-table .rate {
    color: var(--blue);
    font-weight: 800;
}

.analysis-table .na {
    color: #9ca3af;
}

.analysis-note {
    padding: 0 10px 10px;
    color: #6b7280;
    font-size: 11px;
    line-height: 1.55;
    background: #fff;
}

body.modal-open {
    overflow: hidden;
}

@media (max-width: 768px) {
    .section-actions {
        justify-content: flex-start;
    }

    .analysis-grid {
        grid-template-columns: 1fr;
    }

    .analysis-stats {
        grid-template-columns: 1fr 1fr;
    }

    .analysis-dialog {
        max-width: 100%;
        max-height: calc(100vh - 20px);
    }
}

@media (max-width: 480px) {
    .analysis-modal {
        padding: 8px;
        align-items: flex-end;
    }

    .analysis-dialog {
        width: 100%;
        max-width: none;
        max-height: calc(100vh - 12px);
    }

    .analysis-header {
        padding: 9px 10px 8px;
    }

    .analysis-body {
        padding: 8px 10px 10px;
    }
    .analysis-option-item span {
        min-width: 54px;
        height: 28px;
        padding: 0 8px;
        font-size: 11px;
    }
}
/* ===== iPhone 安全区 + 弹窗修复 ===== */
.analysis-modal {
    padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    align-items: flex-start;
}

.analysis-dialog {
    margin-top: 0;
    margin-bottom: 0;
    max-height: calc( 100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 16px );
}

/* 头部始终可见，且不被安全区压住 */
.analysis-header {
    position: sticky;
    top: 0;
    z-index: 3;
    padding-top: calc(10px + env(safe-area-inset-top));
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

/* 内容区域滚动时，底部也留出安全区 */
.analysis-body {
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
    -webkit-overflow-scrolling: touch;
}

/* ===== iOS 下拉框高度修复 ===== */
.analysis-select,
#analysisPlay {
    height: 40px !important;
    min-height: 40px !important;
    line-height: 40px !important;
    padding: 0 36px 0 12px !important;
    border-radius: 4px;
    border: 1px solid #dbe2ea;
    background-color: #fff;
    color: var(--text);
    font-size: 16px !important; /* 防止 iOS 自动缩放/异常压缩 */
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
    background-image: linear-gradient(45deg, transparent 50%, #6b7280 50%), linear-gradient(135deg, #6b7280 50%, transparent 50%);
    background-position: calc(100% - 18px) calc(50% - 2px), calc(100% - 12px) calc(50% - 2px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

/* 统一输入控件高度，避免 iOS 压缩 */
.analysis-input,
.analysis-select,
#analysisPlay {
    font-family: var(--sans);
    vertical-align: middle;
}

/* 关闭按钮点击区域再大一点，避免刘海区误触 */
.analysis-close {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
}

/* 小屏进一步收口，但仍给安全区留位 */
@media (max-width: 480px) {
    .analysis-modal {
        padding: max(6px, env(safe-area-inset-top)) max(6px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left));
    }

    .analysis-dialog {
        max-height: calc( 100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 12px );
    }

    .analysis-header {
        padding-top: calc(8px + env(safe-area-inset-top));
    }

    .analysis-select,
    #analysisPlay,
    .analysis-input {
        height: 38px !important;
        min-height: 38px !important;
        line-height: 38px !important;
        font-size: 16px !important;
    }
}
.analysis-grid.analysis-grid-3 {
    grid-template-columns: 1fr 120px 120px;
}

@media (max-width: 768px) {
    .analysis-grid.analysis-grid-3 {
        grid-template-columns: 1fr;
    }
}
.report-block {
    border: 1px solid #edf2f7;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
}

.report-head {
    padding: 10px 12px;
    background: #f8fbff;
    border-bottom: 1px solid #edf2f7;
}

.report-title {
    font-size: 14px;
    font-weight: 800;
    color: #111827;
}

.report-sub {
    margin-top: 4px;
    font-size: 12px;
    color: #6b7280;
    line-height: 1.6;
}

.report-table-wrap {
    overflow-x: auto;
    /*padding: 0 12px 12px;*/
    background: #fff;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.report-table th,
.report-table td {
    border: 1px solid #edf2f7;
    padding: 8px 8px;
    text-align: center;
}

.report-table th {
    background: #f8fafc;
    color: #374151;
    font-weight: 800;
}

.report-table td {
    color: #111827;
    font-family: var(--mono);
}

.report-table td.rate {
    color: var(--blue);
    font-weight: 800;
}

.report-note {
    padding: 0 12px 12px;
    font-size: 12px;
    color: #6b7280;
    line-height: 1.6;
    background: #fff;
}

.report-empty {
    border: 1px dashed #dbe2ea;
    background: #fff;
    border-radius: 4px;
    padding: 14px;
    color: #6b7280;
    font-size: 13px;
}
/* footer compact mobile override */
@media (max-width: 640px) {
    .site-footer {
        padding: 12px 8px calc(14px + env(safe-area-inset-bottom));
    }

    .law-note {
        margin-bottom: 6px !important;
        font-size: 11px;
        line-height: 1.25;
        white-space: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .footer-inner {
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .footer-links {
        justify-content: flex-start;
        flex-wrap: nowrap;
        gap: 4px;
        width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        line-height: 1.4;
        padding-bottom: 1px;
    }

    .footer-links a,
    .footer-links .sep {
        flex: 0 0 auto;
    }

    .footer-links a {
        padding: 1px 2px;
        font-size: 11px;
    }

    .footer-meta {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-wrap: nowrap;
        width: 100%;
        margin-top: 0;
        white-space: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        line-height: 1.3;
        font-size: 11px;
    }

    .footer-meta > div {
        flex: 0 0 auto;
    }

    .footer-meta .slogan {
        margin-top: 0;
        font-size: 10px;
    }

    .law-note::-webkit-scrollbar,
    .footer-links::-webkit-scrollbar,
    .footer-meta::-webkit-scrollbar {
        display: none;
    }

    .login-footer {
        padding: 0 8px calc(env(safe-area-inset-bottom) + 14px);
    }

    .login-footer .footer-links {
        justify-content: flex-start;
        flex-wrap: nowrap;
        gap: 4px;
        width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        font-size: 11px;
        line-height: 1.4;
    }

    .login-footer .footer-links a,
    .login-footer .sep {
        flex: 0 0 auto;
    }

    .login-footer .footer-note {
        margin-top: 6px;
        font-size: 11px;
        line-height: 1.25;
        white-space: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .login-footer .footer-links::-webkit-scrollbar,
    .login-footer .footer-note::-webkit-scrollbar {
        display: none;
    }
}

@media (max-width: 720px) {
    .app {
        padding: 8px 6px 16px;
    }

    .hero,
    .filter-card,
    .panel,
    .card,
    .table-wrap {
        padding: 8px;
    }

    .hero-top,
    .stats,
    .hero-actions,
    .section-head,
    .modelBox {
        gap: 6px;
    }

    .hero-main {
        font-size: 20px;
        line-height: 1.15;
        font-weight: 600;
    }

    .hero-sub,
    .section-more {
        font-size: 11px;
        line-height: 1.45;
    }
}


