
:root {
  color-scheme: dark;
  --bg: #0b0b0c;
  --panel: #1a1a1e;
  --line: #323238;
  --yellow: #facc15;
  --muted: #a1a1aa;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: white;
  font-family: system-ui, -apple-system, sans-serif;
}

header {
  padding: 24px 20px 14px;
  border-bottom: 1px solid var(--line);
}

.logo {
  color: var(--yellow);
  font-size: 30px;
  font-weight: 900;
}

.subtitle, .muted {
  color: var(--muted);
}

.subtitle, .small {
  font-size: 13px;
}

main {
  max-width: 560px;
  margin: auto;
  padding: 20px 16px 110px;
}

section { display: none; }
section.active { display: block; }

h1 { font-size: 27px; }
h2 { font-size: 19px; }
p { line-height: 1.5; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px;
  margin: 16px 0;
}

.tag {
  display: inline-block;
  background: #3a310e;
  color: var(--yellow);
  border-radius: 99px;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: bold;
}

button {
  cursor: pointer;
  font: inherit;
}

.primary {
  width: 100%;
  margin-top: 12px;
  padding: 15px;
  background: var(--yellow);
  color: #111;
  border: 0;
  border-radius: 13px;
  font-weight: 900;
}

.primary:disabled {
  background: #555;
  color: #bbb;
}

.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.score {
  color: var(--yellow);
  font-size: 32px;
  font-weight: 900;
}

.avatar {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  background: #39300e;
  display: grid;
  place-items: center;
  font-size: 24px;
}

.player {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.player:last-child { border: 0; }
.player .name { flex: 1; font-weight: bold; }
.player .points { color: var(--yellow); font-weight: bold; }

.progress {
  background: #35353a;
  border-radius: 99px;
  height: 9px;
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--yellow);
}

nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  background: #141416;
  border-top: 1px solid var(--line);
  padding: 12px 8px calc(12px + env(safe-area-inset-bottom));
}

nav button {
  flex: 1;
  background: transparent;
  color: var(--muted);
  border: 0;
  padding: 6px;
  font-size: 13px;
  font-weight: bold;
}

nav button.active { color: var(--yellow); }

.navicon {
  display: block;
  font-size: 24px;
  margin-bottom: 4px;
}

.notice {
  border: 1px dashed #716018;
  border-radius: 12px;
  padding: 12px;
  color: #e5d38b;
  font-size: 13px;
  margin-top: 14px;
}

#nickname {
  width: 100%;
  padding: 14px;
  margin: 10px 0;
  background: #101013;
  color: white;
  border: 1px solid #444;
  border-radius: 12px;
  font-size: 16px;
}

#avatarChoices {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

#avatarChoices button {
  font-size: 25px;
  padding: 10px;
  background: #29292d;
  border: 1px solid #555;
  border-radius: 12px;
}

button:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 3px;
}
