* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  color: #222;
  padding: 24px;
}

.card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 16px;
  padding: 32px 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

h1 {
  margin: 0 0 4px;
  font-size: 24px;
  text-align: center;
}

.subtitle {
  margin: 0 0 28px;
  text-align: center;
  color: #777;
  font-size: 14px;
}

.field {
  margin-bottom: 24px;
  border: none;
  padding: 0;
}

label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 8px;
}

legend {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 8px;
  padding: 0;
}

input[type="text"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
}

input[type="text"]:focus {
  outline: none;
  border-color: #333;
}

.option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin-bottom: 8px;
  font-weight: 400;
  cursor: pointer;
}

.option input {
  width: 18px;
  height: 18px;
}

.hint {
  font-size: 13px;
  color: #888;
  margin: 0 0 10px;
}

#friends-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.friend-row {
  display: flex;
  gap: 8px;
}

.friend-row input {
  flex: 1;
}

.friend-remove {
  border: none;
  background: #eee;
  border-radius: 8px;
  width: 40px;
  font-size: 16px;
  cursor: pointer;
}

.btn-secondary {
  width: 100%;
  padding: 10px;
  border: 1px dashed #bbb;
  background: #fafafa;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
}

.btn-primary {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 8px;
  background: #222;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary:active {
  background: #444;
}

.error {
  color: #d33;
  font-size: 13px;
  margin: -8px 0 16px;
}

.done {
  text-align: center;
  font-size: 18px;
}

.done .hint {
  text-align: center;
}

.stats {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #eee;
  text-align: left;
}

.stats-loading,
.stats-note {
  font-size: 13px;
  color: #888;
  text-align: center;
}

.stats-summary {
  font-size: 14px;
  text-align: center;
  margin: 0 0 12px;
}

.stats-teams {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stats-teams li {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  background: #fafafa;
  border-radius: 8px;
  font-size: 14px;
}
