*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: system-ui, sans-serif; font-size: 15px; color: #1a1a1a; background: #f5f5f5; }
.wrap { max-width: 900px; margin: 0 auto; padding: 16px; }
h1 { font-size: 1.6rem; margin-bottom: 4px; }
h2 { font-size: 1.15rem; margin: 20px 0 8px; }
p.sub { color: #555; font-size: 0.9rem; margin-bottom: 16px; }
table { width: 100%; border-collapse: collapse; background: #fff; margin-bottom: 20px; }
th { background: #222; color: #fff; padding: 8px 10px; text-align: left; font-size: 0.85rem; }
td { padding: 7px 10px; border-bottom: 1px solid #e8e8e8; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafafa; }
.rank { color: #888; font-size: 0.8rem; width: 28px; }
.pts { font-weight: 600; font-variant-numeric: tabular-nums; }
.nav { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.nav a { display: inline-block; padding: 4px 10px; background: #fff; border: 1px solid #ccc;
         border-radius: 4px; text-decoration: none; color: #333; font-size: 0.85rem; }
.nav a:hover, .nav a.active { background: #222; color: #fff; border-color: #222; }
.match-list { background: #fff; border-radius: 6px; border: 1px solid #ddd; margin-bottom: 20px; }
.match { display: flex; align-items: center; padding: 10px 14px; border-bottom: 1px solid #eee; gap: 12px; }
.match:last-child { border-bottom: none; }
.match .players { flex: 1; }
.match .home { font-weight: 500; }
.match .score { font-variant-numeric: tabular-nums; min-width: 60px; text-align: center;
                font-weight: 600; color: #333; }
.match .pts-cell { font-size: 0.8rem; color: #555; min-width: 100px; text-align: right; }
.bye { color: #aaa; font-style: italic; }
.pending { color: #bbb; }
.past { background: #fff3cd; border: 1px solid #ffe69c; padding: 6px 10px; border-radius: 4px; }
.btn { display: inline-block; padding: 7px 16px; background: #222; color: #fff;
       border: none; border-radius: 4px; cursor: pointer; font-size: 0.9rem;
       text-decoration: none; }
.btn:hover { background: #444; }
.btn-sm { padding: 4px 10px; font-size: 0.8rem; }
.btn-red { background: #c0392b; }
.btn-red:hover { background: #a93226; }
.admin-bar { background: #222; color: #fff; padding: 8px 16px;
             display: flex; align-items: center; gap: 16px; font-size: 0.85rem; margin-bottom: 0; }
.admin-bar a { color: #ccc; text-decoration: none; }
.admin-bar a:hover { color: #fff; }
.admin-bar a.active { color: #fff; font-weight: 600; border-bottom: 2px solid #fff; }
.form-group { margin-bottom: 14px; }
label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 4px; }
input[type=text], input[type=password], input[type=number], textarea, select {
    width: 100%; padding: 8px 10px; border: 1px solid #ccc; border-radius: 4px;
    font-size: 0.9rem; font-family: inherit; }
textarea { height: 280px; resize: vertical; }
.error { background: #fdecea; border: 1px solid #f5c6cb; color: #721c24;
         padding: 10px 14px; border-radius: 4px; margin-bottom: 14px; }
.complete { color: #27ae60; }
.progress { font-size: 0.85rem; color: #555; margin-bottom: 16px; }
select.score-sel { width: auto; padding: 4px 6px; font-size: 0.85rem; }
.points-table td input { width: 90px; padding: 4px 6px; }
.player-table td { vertical-align: middle; }
.player-table td input[type=text] { padding: 6px 8px; }
a.player-link { color: inherit; text-decoration: none; font-weight: 500; }
a.player-link:hover { text-decoration: underline; }
.site-header { display: flex; align-items: center; gap: 14px; padding-bottom: 16px; border-bottom: 1px solid #ddd; }
.site-header img { height: 80px; width: auto; }
