.sfls {
	--sfls-brand: #1f8a3b;
	--sfls-ink: #16201a;
	--sfls-muted: #5d6a62;
	--sfls-line: #dfe5e1;
	--sfls-card: #ffffff;
	--sfls-soft: #f3f6f4;
	--sfls-live: #d92d20;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	color: var(--sfls-ink);
	line-height: 1.35;
	box-sizing: border-box;
}
.sfls *, .sfls *::before, .sfls *::after { box-sizing: border-box; }
.sfls button { font: inherit; cursor: pointer; }
.sfls [hidden] { display: none !important; }

/* ---------- Scoreboard ---------- */
.sfls-board-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.sfls-title { margin: 0; font-size: 1.5rem; }
.sfls-subtitle { margin: 24px 0 10px; font-size: 1.1rem; color: var(--sfls-muted); text-transform: uppercase; letter-spacing: .06em; }
.sfls-updated { font-size: .85rem; color: var(--sfls-muted); }
.sfls-live-list, .sfls-final-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.sfls-empty { color: var(--sfls-muted); margin: 0; grid-column: 1 / -1; }

.sfls-game { background: var(--sfls-card); border: 1px solid var(--sfls-line); border-radius: 12px; padding: 14px 16px; border-top: 4px solid var(--sfls-brand); }
.sfls-game.is-final { border-top-color: var(--sfls-line); }
.sfls-game-meta { display: flex; justify-content: space-between; gap: 8px; font-size: .8rem; color: var(--sfls-muted); margin-bottom: 10px; }
.sfls-badge { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.sfls-badge.live { color: var(--sfls-live); }
.sfls-badge.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--sfls-live); animation: sfls-pulse 1.4s infinite; }
.sfls-badge.final { color: var(--sfls-muted); }
@keyframes sfls-pulse { 0%,100% { opacity: 1; } 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .sfls-badge.live::before { animation: none; } }

.sfls-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px; padding: 4px 0; }
.sfls-row .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sfls-row.us .name { color: var(--sfls-brand); }
.sfls-row .setswon { font-size: .8rem; color: var(--sfls-muted); min-width: 3.2em; text-align: right; }
.sfls-row .pts { font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; min-width: 2ch; text-align: right; }
.sfls-row.win .name::after { content: " ✓"; color: var(--sfls-brand); }
.sfls-sets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; font-size: .78rem; color: var(--sfls-muted); }
.sfls-sets span { background: var(--sfls-soft); border-radius: 6px; padding: 2px 8px; font-variant-numeric: tabular-nums; }
.sfls-sets .now { background: color-mix(in srgb, var(--sfls-brand) 14%, transparent); color: var(--sfls-ink); font-weight: 600; }

/* ---------- Scorer ---------- */
.sfls-scorer { max-width: 520px; margin: 0 auto; }
.sfls-panel { background: var(--sfls-card); border: 1px solid var(--sfls-line); border-radius: 14px; padding: 18px; margin-bottom: 14px; }
.sfls-panel h2, .sfls-panel h3 { margin: 0 0 12px; }
.sfls-field { display: block; margin-bottom: 12px; }
.sfls-field span { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 4px; }
.sfls-field input, .sfls-field select { width: 100%; font-size: 1.05rem; padding: 10px 12px; border: 1px solid var(--sfls-line); border-radius: 10px; background: #fff; color: var(--sfls-ink); }
.sfls-btn { display: inline-flex; justify-content: center; align-items: center; min-height: 46px; padding: 10px 16px; border-radius: 10px; border: 1px solid var(--sfls-line); background: var(--sfls-soft); color: var(--sfls-ink); font-weight: 600; text-decoration: none; }
.sfls-btn.primary { background: var(--sfls-brand); border-color: var(--sfls-brand); color: #fff; }
.sfls-btn.danger { color: var(--sfls-live); }
.sfls-btn.block { width: 100%; }
.sfls-btn:disabled { opacity: .5; cursor: default; }
.sfls-error { color: var(--sfls-live); font-weight: 600; margin: 8px 0 0; }
.sfls-note { color: var(--sfls-muted); font-size: .85rem; margin: 6px 0 0; }
.sfls-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sfls-list button { width: 100%; text-align: left; display: flex; justify-content: space-between; gap: 10px; }

.sfls-scorebar { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.sfls-scorebar .info { font-size: .85rem; color: var(--sfls-muted); }
.sfls-setline { text-align: center; font-weight: 700; margin: 4px 0 12px; }
.sfls-pads { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 10px; }
.sfls-pad { display: flex; flex-direction: column; gap: 8px; }
.sfls-plus { min-height: 190px; border-radius: 16px; border: 0; background: var(--sfls-brand); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 10px; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.sfls-pad.away .sfls-plus { background: #3a4540; }
.sfls-plus .t { font-size: 1rem; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sfls-plus .n { font-size: 4.2rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.sfls-plus .h { font-size: .75rem; opacity: .85; }
.sfls-plus:active { transform: scale(.98); }
.sfls-minus { min-height: 44px; }
.sfls-endset { margin-top: 12px; }
.sfls-endset.ready { animation: sfls-glow 1.6s infinite; }
@keyframes sfls-glow { 0%,100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--sfls-brand) 50%, transparent); } 50% { box-shadow: 0 0 0 6px transparent; } }
.sfls-more { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.sfls-sync { font-size: .8rem; color: var(--sfls-muted); text-align: center; margin-top: 10px; min-height: 1.2em; }
.sfls-fix { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
