*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #0d1117; --surface: #161b22; --surface-alt: #1c2333;
  --border: #30363d; --border-light: #21262d;
  --green: #2ea043; --green-bright: #3fb950; --green-dim: #1a7f37;
  --text: #e6edf3; --text-muted: #8b949e; --text-dim: #484f58;
  --accent: #58a6ff; --red: #f85149; --orange: #d29922; --gold: #e3b341;
  --white: #ffffff;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
body {
  font-family: var(--font); background: var(--bg); color: var(--text);
  min-height: 100dvh; -webkit-font-smoothing: antialiased;
}
#root { max-width: 520px; margin: 0 auto; padding: 0 16px 100px; width: 100%; }
@media (min-width: 640px) {
  #root { max-width: 700px; }
}
@media (min-width: 1024px) {
  #root { max-width: 980px; padding: 0 24px 100px; }
}
.grid-list { display: flex; flex-direction: column; }
@media (min-width: 700px) {
  .grid-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; align-items: start; }
  .grid-list > div { margin-bottom: 0 !important; }
}
.rankings-grid { display: flex; flex-direction: column; gap: 10px; }
@media (min-width: 700px) {
  .rankings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; align-items: stretch; }
  .rankings-grid > div { margin-bottom: 0 !important; }
}
.form-card { max-width: 480px; }
.assign-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 640px) {
  .assign-grid { grid-template-columns: repeat(4, 1fr); }
}
button { cursor: pointer; font-family: var(--font); }
input { font-family: var(--font); }
input:focus { border-color: var(--green) !important; outline: none; }
button:active { opacity: 0.85; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.score-input::-webkit-outer-spin-button, .score-input::-webkit-inner-spin-button { -webkit-appearance: none; appearance: none; margin: 0; }
.score-input { -moz-appearance: textfield; appearance: textfield; }
.toast {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%);
  background: var(--green); color: var(--white); padding: 10px 20px;
  border-radius: 8px; font-size: 13px; font-weight: 600; z-index: 100;
  animation: toast-in 0.3s ease, toast-out 0.3s ease 1.7s forwards;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
@keyframes toast-in { from { opacity: 0; transform: translateX(-50%) translateY(10px); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(-50%) translateY(10px); } }
