*{box-sizing:border-box}

body{
  margin:0;
  font-family:Arial,Helvetica,sans-serif;
  background:#1d2088;
  color:#fff;
  overflow-y:auto;
}

.page{
  max-width:1200px;
  margin:0 auto;
  padding:24px;
}

.hero{
  text-align:center;
  padding:16px 0 20px;
}

.hero h1{
  margin:0;
  color:#F8B500;
  font-size:44px;
}

.subtitle{
  opacity:.9;
  margin:8px 0 18px;
}

.toolbar{
  display:flex;
  gap:16px;
  justify-content:center;
  align-items:end;
  flex-wrap:wrap;
}

label{
  display:flex;
  flex-direction:column;
  gap:6px;
  font-weight:700;
}

select{
  padding:10px 12px;
  min-width:280px;
  border-radius:8px;
  border:none;
}

.type-toggle,.tabs{
  display:flex;
  gap:10px;
  justify-content:center;
  flex-wrap:wrap;
}

button{
  cursor:pointer;
  border:none;
  border-radius:10px;
  padding:12px 18px;
  font-weight:700;
}

.type-toggle button,.tabs button{
  background:#fff;
  color:#1d2088;
}

.type-toggle button.active,.tabs button.active{
  background:#F8B500;
  color:#1d2088;
}

.meta{
  margin-top:14px;
  font-size:14px;
  opacity:.95;
}

.card{
  background:#fff;
  color:#111;
  border-radius:16px;
  padding:18px;
  margin-top:18px;
  overflow:visible;
}

.hidden{
  display:none;
}

table{
  width:100%;
  border-collapse:collapse;
  table-layout:auto;
}

th,td{
  padding:10px 12px;
  border-bottom:1px solid #ddd;
  text-align:center;
}

th{
  background:#F8B500;
  color:#1d2088;
  position:static;
  top:auto;
}

.player-link,.score-link{
  color:#1d2088;
  font-weight:700;
  text-decoration:underline;
  cursor:pointer;
}

.matrix{
  font-size:14px;
}

.matrix th:first-child,
.matrix td:first-child{
  text-align:left;
  position:static;
  left:auto;
  background:#eef2ff;
}

.matrix .diag{
  background:#4A4A4A;
  color:#fff;
}

.matrix .played{
  background:#FFF36D;
  font-weight:700;
}

.overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.6);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:16px;
}

.modal{
  background:#fff;
  color:#111;
  max-width:900px;
  width:100%;
  max-height:90vh;
  overflow:auto;
  border-radius:16px;
  padding:18px;
  position:relative;
}

.close-btn{
  position:absolute;
  right:12px;
  top:10px;
  background:#1d2088;
  color:#fff;
  font-size:24px;
  line-height:1;
  padding:6px 12px;
}

.section-title{
  margin:0 0 12px;
  color:#1d2088;
}

.note{
  font-size:13px;
  color:#555;
}

@media (max-width:700px){
  .hero h1{font-size:32px}
  select{min-width:220px}
  .page{padding:14px}
  th,td{padding:8px 8px;font-size:14px}
}
