:root {
  --bg: #16171d; --panel: #22242d; --line: #343744; --text: #eceef4; --muted: #9298a8;
  --a: #f0a63c; --b: #5aa7f0; --win: #6fd38a; --btn: #3a3e4d;
}
* { box-sizing: border-box; }
body { margin: 0; padding: 16px; background: var(--bg); color: var(--text);
  font: 15px/1.4 system-ui, "Segoe UI", sans-serif; }
header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
h1 { margin: 0 0 12px; font-size: 24px; }
.muted { color: var(--muted); }
button { background: var(--btn); color: var(--text); border: 0; border-radius: 6px;
  padding: 8px 14px; font: inherit; cursor: pointer; }
button:hover:not(:disabled) { filter: brightness(1.25); }
button:disabled { opacity: .45; cursor: default; }
button.primary { background: var(--win); color: #10140f; font-weight: 600; }
h2 { font-size: 17px; margin: 20px 0 6px; }
input, textarea { background: var(--panel); color: var(--text); border: 1px solid var(--line);
  border-radius: 6px; padding: 8px 10px; font: inherit; min-width: 0; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 8px 0; }
.row.centered { justify-content: center; }
.row input, .row textarea { flex: 1 1 200px; }
textarea { resize: vertical; }
button.link { background: none; padding: 0; color: var(--b); text-decoration: underline; }
input.share { flex: 0 1 320px; color: var(--muted); font-size: 13px; }
ul.list { list-style: none; padding: 0; margin: 0; }
ul.list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 8px 0; border-bottom: 1px solid var(--line); }
ul.list li .row { margin: 0; }
ol.edit-list { list-style: none; padding: 0; }
ol.edit-list li { display: flex; gap: 6px; align-items: center; margin: 4px 0; }
ol.edit-list .thumb { width: 36px; height: 36px; object-fit: cover; border-radius: 4px; flex: none; background: var(--panel); }
ol.edit-list .n { width: 2.5em; text-align: right; color: var(--muted); flex: none; }
ol.edit-list input { flex: 3 1 0; }
ol.edit-list input + input { flex: 2 1 0; }
ol.edit-list input + input + input { flex: 2 1 0; }

.round { text-align: center; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: 13px; }
.matchup { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: stretch; margin: 12px 0; }
.vs { align-self: center; font-weight: 700; color: var(--muted); }
.card { background: var(--panel); border: 2px solid var(--line); border-radius: 10px; padding: 14px;
  display: flex; flex-direction: column; gap: 10px; }
.card.a { border-color: var(--a); } .card.b { border-color: var(--b); }
.card.mine { box-shadow: 0 0 0 3px var(--text) inset; }
.card .cover { width: 100%; max-height: 300px; object-fit: contain; border-radius: 6px; background: #0e0f13; }
.card .name { font-size: 20px; font-weight: 600; }
.card .count { font-size: 32px; font-weight: 700; }
.card .voters { color: var(--muted); font-size: 13px; }
.center { text-align: center; }
.champ { text-align: center; padding: 24px; }
.champ .cover { display: block; margin: 12px auto; max-width: min(320px, 80%); max-height: 400px; border-radius: 8px; }
img.result { display: block; width: 100%; max-width: 1200px; margin: 16px auto 4px; border-radius: 8px; border: 1px solid var(--line); }
.champ .name { font-size: 34px; font-weight: 700; color: var(--win); }

#player { margin: 12px 0; }
#player iframe { width: 100%; max-width: 560px; aspect-ratio: 16/9; border: 0; border-radius: 8px; display: block; margin: 0 auto; }

#bracket { display: flex; gap: 16px; overflow-x: auto; margin-top: 24px; padding-bottom: 8px; }
.col { display: flex; flex-direction: column; justify-content: space-around; gap: 8px; min-width: 170px; }
.col h3 { margin: 0; font-size: 12px; color: var(--muted); text-transform: uppercase; }
.bm { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; font-size: 13px; }
.bm.live { border-color: var(--text); }
.bm div { padding: 4px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bm div + div { border-top: 1px solid var(--line); }
.bm .w { color: var(--win); font-weight: 600; }
.bm .l { color: var(--muted); text-decoration: line-through; }

@media (max-width: 560px) {
  .matchup { grid-template-columns: 1fr; }
}
