html, body {
  margin: 0;
  height: 100%;
  background: #070910;
  overflow: hidden;
  user-select: none;
}

canvas {
  display: block;
  width: 100vw;
  height: 100vh;
  touch-action: none;
  cursor: crosshair;
}

#site-home {
  position: fixed;
  z-index: 3;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  color: #f4e7cf;
  font: 13px "Microsoft YaHei", "PingFang SC", sans-serif;
  text-decoration: none;
  opacity: 0.8;
}

#rank-dock,
#finish {
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  color: #f6efe2;
}

#rank-dock {
  position: fixed;
  z-index: 3;
  right: 16px;
  bottom: 16px;
  width: min(240px, 42vw);
  padding: 12px 14px;
  background: rgba(8, 10, 16, 0.72);
  border: 1px solid rgba(244, 231, 207, 0.28);
  border-radius: 14px;
}

#rank-dock h2,
.sheet h2 {
  margin: 0 0 8px;
  font-size: 16px;
}

#rank-dock p,
#finish-stats,
#finish-msg {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.5;
}

#rank-list,
#finish-list {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
}

#finish {
  position: fixed;
  z-index: 4;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 8, 14, 0.55);
}

#finish[hidden],
#rank-dock[hidden] {
  display: none;
}

.sheet {
  width: min(420px, calc(100vw - 32px));
  padding: 22px 22px 16px;
  background: #141820;
  border-radius: 18px;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.35);
}

#finish-form {
  display: flex;
  gap: 8px;
}

#player-name {
  flex: 1;
  border: 0;
  border-radius: 10px;
  padding: 10px 12px;
  font: 15px "Microsoft YaHei", "PingFang SC", sans-serif;
}

button {
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  background: #f3e2c2;
  color: #1c1915;
  font: 600 14px "Microsoft YaHei", "PingFang SC", sans-serif;
  cursor: pointer;
}

.row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.row button {
  flex: 1;
  background: transparent;
  color: #f6efe2;
  border: 1px solid rgba(246, 239, 226, 0.35);
}
