.l539-wrap { max-width: 1120px; margin: 20px auto; font-family: -apple-system, BlinkMacSystemFont, "Noto Sans TC", sans-serif; color: #1e293b; }
.l539-error-banner { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-weight: 600; font-size: .92rem; }
.l539-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 20px; margin-bottom: 18px; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.l539-header-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.l539-header-row h2, .l539-header-row h3 { margin: 0; font-size: 1.15rem; }
.l539-badge { background: #eff6ff; color: #1d4ed8; padding: 4px 10px; border-radius: 999px; font-size: .85rem; font-weight: 600; }

.l539-balls-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.l539-ball-box { background: #f8fafc; border-radius: 8px; padding: 14px; border: 1px solid #e2e8f0; }
.l539-actual-box { background: #fefce8; border-color: #fde047; }
.l539-box-title { font-size: .85rem; color: #475569; margin-bottom: 10px; font-weight: 600; }
.l539-ball-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.l539-ball { width: 38px; height: 38px; border-radius: 50%; background: #334155; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .95rem; }
.l539-ball.l539-hit { background: #16a34a; box-shadow: 0 0 0 3px #bbf7d0; }
.l539-pending { color: #94a3b8; font-size: .9rem; }

.l539-controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; align-items: end; }
.l539-ctrl-item label { display: block; font-size: .82rem; font-weight: 600; color: #475569; margin-bottom: 6px; }
.l539-ctrl-item select { width: 100%; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; }
.l539-switch-label { display: flex !important; align-items: center; gap: 6px; cursor: pointer; }
.l539-slider-row { display: flex; align-items: center; gap: 10px; }
.l539-slider-row input[type="range"] { flex: 1; }

.l539-kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.l539-blind-highlight { border-left: 4px solid #e11d48; }
.l539-kpi-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 10px; }
.l539-kpi-list div { background: #f8fafc; padding: 10px; border-radius: 6px; }
.l539-kpi-list span { display: block; font-size: .78rem; color: #64748b; }
.l539-kpi-list strong { font-size: 1rem; }

.l539-chart-container { position: relative; height: 340px; width: 100%; }
.l539-table-scroll { overflow-x: auto; }
.l539-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.l539-table th, .l539-table td { padding: 10px 8px; border-bottom: 1px solid #e2e8f0; text-align: left; white-space: nowrap; }
.l539-table th { background: #f8fafc; color: #475569; font-weight: 600; }
.l539-mini-ball { display: inline-block; padding: 2px 6px; margin-right: 3px; border-radius: 4px; background: #e2e8f0; font-weight: 600; font-size: .8rem; }
.l539-mini-ball.l539-hit { background: #16a34a; color: #fff; }
.l539-mini-ball.l539-act { background: #fef08a; color: #854d0e; }

.l539-tag-train { background: #e0f2fe; color: #0369a1; padding: 2px 6px; border-radius: 4px; font-size: .75rem; }
.l539-tag-blind { background: #ffe4e6; color: #be123c; padding: 2px 6px; border-radius: 4px; font-size: .75rem; font-weight: 600; }
.l539-tag-live  { background: #dcfce7; color: #15803d; padding: 2px 6px; border-radius: 4px; font-size: .75rem; }
.l539-pos { color: #16a34a; }
.l539-neg { color: #dc2626; }
.l539-pager { display: flex; align-items: center; gap: 8px; }
.l539-pager button { padding: 4px 10px; border: 1px solid #cbd5e1; background: #fff; border-radius: 5px; cursor: pointer; }
